Zumbis Online
Últimos assuntos
» [ZP AMXX] CSO Shop Costumes
por zgd.dll 16/12/2017, 3:21 pm

» Servidores da P[c]T eGames
por scho 3/12/2017, 4:22 pm

» (Ajuda) ZM VIP com Status do Perfect por Menssagem para Dono tambem!
por scho 26/11/2017, 9:09 am

» Voltei ao fórum
por zgd.dll 25/11/2017, 12:20 am

» plugin gamemode infection
por cancels 21/11/2017, 10:22 pm

» plugin ap force_jump
por cancels 21/11/2017, 9:29 pm

» plugin gamemode sniper
por cancels 21/11/2017, 7:58 pm

» plugin class zm_climb
por [P]erfec[T] [S]cr[@]s[H] 17/11/2017, 5:46 pm

» plugin item t-virus
por [P]erfec[T] [S]cr[@]s[H] 17/11/2017, 5:39 pm

» Hide Sheek Supply Box
por cancels 12/11/2017, 9:00 pm

Frases filosóficas Zplague:
....
Os membros mais ativos da semana

Adsense

plugin gamemode infection

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

plugin gamemode infection

Mensagem por cancels em 21/11/2017, 10:22 pm

alguem pode me da uma força pra edita o GAME MODE INFECÇÃO.


para quando o modo for ativado aparecer o nome dos 2 ultimo zombie da rodada segue uma imagem de exemplo.


eu atualmente estou usando um plugin complementar para colocar o segundo zombie na rodada de infecção modo.

só que já tentei incluir para ele pucha o nome do ultimo zombie que e escolhido pelo plugin zp50_gamemode_infection.sma

mais não conseguir.

zp50_gamemode_infection.sma
Código:
#include <amxmodx>
#include <  fun >
#include <fakemeta>
#include <hamsandwich>
#include <cs_teams_api>
#include <cs_ham_bots_api>
#include <zp50_gamemodes>
#include <zp50_deathmatch>

// HUD messages
#define HUD_EVENT_X -1.0
#define HUD_EVENT_Y 0.17
#define HUD_EVENT_R 255
#define HUD_EVENT_G 0
#define HUD_EVENT_B 0

new g_MaxPlayers
new g_HudSync
new g_TargetPlayer

new cvar_infection_chance, cvar_infection_min_players
new cvar_infection_show_hud
new cvar_infection_allow_respawn, cvar_respawn_after_last_human
new cvar_zombie_first_hp_multiplier

public plugin_precache()
{
 // Register game mode at precache (plugin gets paused after this)
 register_plugin("[ZP] Game Mode: Infection", ZP_VERSION_STRING, "ZP Dev Team")
 new game_mode_id = zp_gamemodes_register("Infection Mode")
 zp_gamemodes_set_default(game_mode_id)
 
 // Create the HUD Sync Objects
 g_HudSync = CreateHudSyncObj()
 
 g_MaxPlayers = get_maxplayers()
 
 cvar_infection_chance = register_cvar("zp_infection_chance", "1")
 cvar_infection_min_players = register_cvar("zp_infection_min_players", "0")
 cvar_infection_show_hud = register_cvar("zp_infection_show_hud", "1")
 cvar_infection_allow_respawn = register_cvar("zp_infection_allow_respawn", "1")
 cvar_respawn_after_last_human = register_cvar("zp_respawn_after_last_human", "1")
 cvar_zombie_first_hp_multiplier = register_cvar("zp_zombie_first_hp_multiplier", "2.0")
}

// Deathmatch module's player respawn forward
public zp_fw_deathmatch_respawn_pre(id)
{
 // Respawning allowed?
 if (!get_pcvar_num(cvar_infection_allow_respawn))
 return PLUGIN_HANDLED;
 
 // Respawn if only the last human is left?
 if (!get_pcvar_num(cvar_respawn_after_last_human) && zp_core_get_human_count() == 1)
 return PLUGIN_HANDLED;
 
 return PLUGIN_CONTINUE;
}

public zp_fw_gamemodes_choose_pre(game_mode_id, skipchecks)
{
 if (!skipchecks)
 {
 // Random chance
 if (random_num(1, get_pcvar_num(cvar_infection_chance)) != 1)
 return PLUGIN_HANDLED;
 
 // Min players
 if (GetAliveCount() < get_pcvar_num(cvar_infection_min_players))
 return PLUGIN_HANDLED;
 }
 
 // Game mode allowed
 return PLUGIN_CONTINUE;
}

public zp_fw_gamemodes_choose_post(game_mode_id, target_player)
{
 // Pick player randomly?
 g_TargetPlayer = (target_player == RANDOM_TARGET_PLAYER) ? GetRandomAlive(random_num(1, GetAliveCount())) : target_player
}

public zp_fw_gamemodes_start()
{
 // Allow infection for this game mode
 zp_gamemodes_set_allow_infect()
 
 // Turn player into the first zombie
 zp_core_infect(g_TargetPlayer, g_TargetPlayer) // victim = atttacker so that infection sound is played
 set_user_health(g_TargetPlayer, floatround(get_user_health(g_TargetPlayer) * get_pcvar_float(cvar_zombie_first_hp_multiplier)))
 
 // Remaining players should be humans (CTs)
 new id
 for (id = 1; id <= g_MaxPlayers; id++)
 {
 // Not alive
 if (!is_user_alive(id))
 continue;
 
 // This is our first zombie
 if (zp_core_is_zombie(id))
 continue;
 
 // Switch to CT
 cs_set_player_team(id, CS_TEAM_CT)
 }
 
 if (get_pcvar_num(cvar_infection_show_hud))
 {
 // Show First Zombie HUD notice
 new name[32]
 get_user_name(g_TargetPlayer, name, charsmax(name))
 set_hudmessage(HUD_EVENT_R, HUD_EVENT_G, HUD_EVENT_B, HUD_EVENT_X, HUD_EVENT_Y, 0, 0.0, 5.0, 1.0, 1.0, -1)
 ShowSyncHudMsg(0, g_HudSync, "%L", LANG_PLAYER, "NOTICE_FIRST", name)
 }
}

// Get Alive Count -returns alive players number-
GetAliveCount()
{
 new iAlive, id
 
 for (id = 1; id <= g_MaxPlayers; id++)
 {
 if (is_user_alive(id))
 iAlive++
 }
 
 return iAlive;
}

// Get Random Alive -returns index of alive player number target_index -
GetRandomAlive(target_index)
{
 new iAlive, id
 
 for (id = 1; id <= g_MaxPlayers; id++)
 {
 if (is_user_alive(id))
 iAlive++
 
 if (iAlive == target_index)
 return id;
 }
 
 return -1;
}



zp50_infection_are.sma

Código:
#include <amxmodx>
#include <zombieplague>

#define PLUGIN "[ZP] Infection Are"
#define VERSION "0.1"
#define AUTHOR "Barney"

new cvar_minplayers

public plugin_init()
{
 register_plugin(PLUGIN, VERSION, AUTHOR)
 cvar_minplayers = register_cvar("zp_ajudante_minplayers", "5")
}

public zp_round_started(gm)
{
 if(get_playersnum() <  get_pcvar_num(cvar_minplayers))
 {
 return
 }
 if(gm==MODE_INFECTION)
 {
 plus_zombie()
 }
}

public plus_zombie()
{
 static players[32],num,id
 new szName[32]
 get_players(players, num, "a")
 id = players[random(num)]
 
 if(zp_get_user_zombie(id))
 {
 plus_zombie()
 return
 }
 else
 {
 get_user_name(id, szName, charsmax(szName))
 zp_infect_user(id)
 ChatColor(0, "!g[P3X] !yInfected zombies are !g%s",szName)
 }
}

stock ChatColor(const id, const input[], any:...)
{
 new count = 1, players[32]
 static msg[191]
 vformat(msg, 190, input, 3)
 
 replace_all(msg, 190, "!g", "^4") // Green Color
 replace_all(msg, 190, "!y", "^1") // Default Color
 replace_all(msg, 190, "!t", "^3") // Team Color
 replace_all(msg, 190, "!t2", "^0") // Team2 Color
 
 if (id) players[0] = id; else get_players(players, count, "ch")
 {
 for (new i = 0; i < count; i++)
 {
 if (is_user_connected(players[i]))
 {
 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
 write_byte(players[i]);
 write_string(msg);
 message_end();
 }
 }
}
}

____________________________________________

avatar
cancels
Humano
Humano

Nick : ByVodka
Masculino Número de Mensagens : 50
Woow!!
Ammo Packs : 160
Honra : 1
Data de inscrição : 24/06/2017

Ver perfil do usuário http://steamcommunity.com/id/IByVodka/ thallescintra

Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum