Code
#include <amxmodx>
new g_sprite
new g_accesscvar
new bool:gb_smile[33]
public plugin_init()
{
register_plugin("cheer", "0.3b", "Radiance + NZXT.")
register_clcmd("cheer", "cmdCheer")
g_accesscvar = register_cvar("cheer_access", "1")
}
public plugin_precache()
{
g_sprite = precache_model("sprites/smile.spr")
precache_sound("misc/woohoo2.wav")
}
public cmdCheer(id)
{
if(!is_user_alive(id))
return 1;
if(get_pcvar_num(g_accesscvar) && !(get_user_flags(id) & ADMIN_CHAT))
return 1;
switch(gb_smile[id])
{
case true: rem_cheer(id);
case false: set_cheer(id);
}
gb_smile[id] = !gb_smile[id];
return 1;
}
stock rem_cheer(id)
{
message_begin(MSG_ALL, SVC_TEMPENTITY);
write_byte(125);
write_byte(id);
message_end();
client_print(id, print_chat, "*Smile Off");
}
stock set_cheer(id)
{
message_begin(MSG_ALL, SVC_TEMPENTITY);
write_byte(124);
write_byte(id);
write_coord(35);
write_short(g_sprite);
write_short(100);
message_end();
emit_sound(id, CHAN_VOICE, "misc/woohoo2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
client_print(id, print_chat, "*Smile On");
}
public client_connect(id) gb_smile[id] = false;
public client_disconnect(id) gb_smile[id] = false;
этот плагин выполняет действие при нажатии кнопки J, так вот где здесь зашифрована эта самая J? ---------------------
блин разделом ошибся...