Ola queria saber se alguém poderia colocar os cvars para o dano da thunder :)
Código:
#include < amxmodx >
#include < engine >
#include < zombieplague >
#include < hamsandwich >
#define PLUGIN "[ZP] Sub-plugin: Thunder AK47"
#define VERSION "0.1"
#define AUTHOR "Beuller/Editado por Scr4sh"
new v_ak47_TW[]="models/TW/v_tw_ak47_TW.mdl"
new const p_ak47_TW[] = "models/TW/p_tw_ak47_TW.mdl"
new bool:g_bHasStixak47[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_event("DeathMsg", "DeathMsg", "a")
RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
}
public plugin_precache()
{
precache_model(v_ak47_TW)
precache_model(p_ak47_TW)
}
//Events: Remove model
public client_connect(id)
{
g_bHasStixak47[id] = false
}
public client_disconnect(id)
{
g_bHasStixak47[id] = false
}
public zp_user_infected_post(infected, infector)
{
if (g_bHasStixak47[infected])
{
g_bHasStixak47[infected] = false
}
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
g_bHasStixak47[victim] = false
}
public ham_PlayerSpawn_Post(id)
{
g_bHasStixak47[id] = false
return PLUGIN_CONTINUE
}
public event_round_start()
{
for (new i = 1; i <= 32; i++)
{
g_bHasStixak47[i] = false
}
}
public DeathMsg()
{
new i = read_data(1)
if(get_user_weapon(i) == CSW_AK47)
{
set_model(i)
}
}
public set_model(id)
{
g_bHasStixak47[id] = true
}
public event_CurWeapon(id)
{
new weapid = read_data(2)
if(!is_user_alive(id))
return;
if(g_bHasStixak47[id] && weapid == CSW_AK47)
{
entity_set_string(id, EV_SZ_viewmodel, v_ak47_TW)
entity_set_string(id, EV_SZ_weaponmodel, p_ak47_TW)
}
}