A Sma Da Thunder Colt:
Spoiler :
#include < amxmodx >
#include < engine >
#include < zombieplague >
#include < hamsandwich >
#define PLUGIN "[ZP] Sub-plugin: Thunder M4A1"
#define VERSION "0.1"
#define AUTHOR "Beuller"
new v_m4a1_perfect[]="models/v_m4a1_perfect.mdl"
new const p_m4a1_perfect[] = "models/p_m4a1_perfect.mdl"
new bool:g_bHasStixm4a1[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_m4a1_perfect)
precache_model(p_m4a1_perfect)
}
public client_connect(id)
{
g_bHasStixm4a1[id] = false
}
public client_disconnect(id)
{
g_bHasStixm4a1[id] = false
}
public zp_user_infected_post(infected, infector)
{
if (g_bHasStixm4a1[infected])
{
g_bHasStixm4a1[infected] = false
}
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
g_bHasStixm4a1[victim] = false
}
public ham_PlayerSpawn_Post(id)
{
g_bHasStixm4a1[id] = false
return PLUGIN_CONTINUE
}
public event_round_start()
{
for (new i = 1; i <= 32; i++)
{
g_bHasStixm4a1[i] = false
}
}
public DeathMsg()
{
new i = read_data(1)
if(get_user_weapon(i) == CSW_M4A1)
{
set_model(i)
}
}
public set_model(id)
{
g_bHasStixm4a1[id] = true
}
public event_CurWeapon(id)
{
new weapid = read_data(2)
if(!is_user_alive(id))
return;
if(g_bHasStixm4a1[id] && weapid == CSW_M4A1)
{
entity_set_string(id, EV_SZ_viewmodel, v_m4a1_perfect)
entity_set_string(id, EV_SZ_weaponmodel, p_m4a1_perfect)
}
}
E o Da Thunder Ak47:
Spoiler :
#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_perfect[]="models/v_ak47_perfect.mdl"
new const p_ak47_perfect[] = "models/p_ak47_perfect.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_perfect)
precache_model(p_ak47_perfect)
}
//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_perfect)
entity_set_string(id, EV_SZ_weaponmodel, p_ak47_perfect)
}
}
OBS: Ira ter que editar as models ou ira dar erro