Junior Member
|
01-10-2012
, 16:50
Please help
|
#1
|
Hi i need some help . Here the sma :
Code:
/* Plugin generated by NotePad */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#define PLUGIN "Sala"
#define VERSION "1.0"
#define AUTHOR "Sniffer"
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 /sala", "client_say")
}
public client_say(id)
{
if(get_user_team(id) != 1)
{
chat_color(0, "Curcani!n nu au!n Voie!!g")
return
}
chat_color(0, "%s!g Ai alergat:!n [%d]!g curcani", id, 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
}
stock chat_color(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!n", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "!t2", "^0")
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()
}
}
}
}
Ok so the plug need to increase speed when i am ducking . And i type "/sala" and it shows me my pushups . And when i am shooting the speed must increase . And it dont work ... "new Float:speeds[] = { 0.0, 5.0, 10.0, 15.0, 25.0 }" i need to edit this thing ? Sorry for my bad english . I need help
Last edited by DarkDeviL; 03-23-2021 at 03:46.
Reason: Restore to previous version.
|
|