- Du är inte en fonge.
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#define PLUGIN "Jail Break: Silownia"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
new ducks[33]
new Float:speeds[] = { 0.0, 5.0, 10.0, 15.0, 25.0 }
new static models[][] = { "models/p_bknuckles.mdl", "models/v_bknuckles.mdl" }
new static sounds[][] = { "weapons/cbar_hitbod2.wav", "weapons/cbar_hitbod1.wav", "weapons/bullet_hit1.wav", "weapons/bullet_hit2.wav" }
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "CurWeapon", "be", "1=1")
register_forward(FM_PlayerPreThink, "PlayerPreThink", 0)
register_forward(FM_EmitSound, "EmitSound")
register_clcmd("say /gym", "client_say")
}
public client_say(id)
{
if(get_user_team(id) != 1)
{
client_print(id, print_chat, "Du är inte en fonge.")
return
}
client_print(id, print_chat, "Din statistik po gym:")
client_print(id, print_chat, "[ Knaboj: %d Gonger ]", ducks[id])
}
public client_disconnect(id)
{
ducks[id] = 0
}
public PlayerPreThink(id)
{
if(!is_user_alive(id))
return FMRES_IGNORED
if(pev(id, pev_oldbuttons) & IN_DUCK && !(pev(id, pev_button) & IN_DUCK) && get_user_team(id) == 1)
{
static s_iFlags
s_iFlags = pev(id, pev_flags)
if(/*!*/(s_iFlags & FL_DUCKING)/* && pev(id, pev_bInDuck)*/)
{
ducks[id] ++
}
}
return FMRES_IGNORED;
}
public plugin_precache()
{
static i
for(i = 0; i < sizeof models; i++)
{
precache_model(models[i])
}
for(i = 0; i < sizeof sounds; i++)
{
precache_sound(sounds[i])
}
}
public CurWeapon(id)
{
if(is_user_alive(id) && get_user_team(id) == 1)
{
if(read_data(2) == 29)
{
set_pev(id, pev_viewmodel2, models[1])
set_pev(id, pev_weaponmodel2, models[0])
}
switch(ducks[id])
{
case 50 .. 100: fm_set_user_maxspeed(id, fm_get_user_maxspeed(id) + speeds[1])
case 101 .. 200: fm_set_user_maxspeed(id, fm_get_user_maxspeed(id) + speeds[2])
case 201 .. 300: fm_set_user_maxspeed(id, fm_get_user_maxspeed(id) + speeds[3])
case 301 .. 1000: fm_set_user_maxspeed(id, fm_get_user_maxspeed(id) + speeds[4])
default: {}
}
}
}
public EmitSound(id, channel, sample[])
{
if(is_user_alive(id) && get_user_team(id) == 1)
{
if(equal(sample, "weapons/knife_", 14))
{
if(equal(sample, "weapons/knife_hit", 17))
{
emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", random_float(0.5, 1.0), ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if(equal(sample,"weapons/knife_stab.wav"))
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if(equal(sample,"weapons/knife_hitwall1.wav"))
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_LOW)
return FMRES_SUPERCEDE
}
}
}
return FMRES_IGNORED
}