Hello,
Can someone make a plugin that Count frags from 0 to death and show this message in hud:
set_hudmessage(255, 0, 0, 0.02, 0.20, 0, 1.0, 1.0, 0.1, 0.2, 1)
show_hudmessage(id, "Frags: %d", frags)
After he die frags need to reset to 0.
I must say i'm using CSDM and is only 1 round with no time per round
When the player get to 10 frags
set_user_health(id, 300)
set_user_armor(id, 200)
and his screen makes red for 1 sec
and after he die to became normal
100 hp, 0 armor
Thank you
I've tryed something:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
new const sounds[ ][ ] =
{
"rage/scream1.wav",
"rage/scream3.wav",
"rage/scream4.wav",
"rage/scream02.wav",
"rage/scream06.wav"
};
public plugin_init()
{
register_event("DeathMsg", "hook_death", "a", "1>0")
}
public plugin_precache( )
{
for( new i; i < sizeof sounds; i++ )
{
precache_sound( sounds[ i ] );
}
}
public hook_death(id)
{
if(get_user_frags(id) > 2)
{
set_user_health(id, 300)
set_user_armor(id, 200)
new name[33]
get_user_name(id, name, 32)
set_hudmessage(200, 0, 0, -1.0, 0.25, 0, 6.0, 5.0)
show_hudmessage(0, "%s: RAGE !!! Sa il omoare cineva !!!", name )
client_cmd( 0, "spk ^"%a^"", sounds[random_num(0,sizeof(sounds))])
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(200)
write_byte(0)
write_byte(0)
write_byte(75)
message_end()
}
else
{
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}