hey guys i'm working on this plugin that when u die a hud message (and the hud message will have different colors, like this /wPress /yX /wto respawn..)
and if u will press X u will respawn( i think pressing X to respawn instantly works already but i'm not sure) ..can u guys also help if the respawning player after 5 sec. after death is wrong..
the wrong i know here is the hud message..can someone help me??
when i drag the .sma to the compiler is all errors are pointing at the part of the hud message..so can someone help me?please..
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
public plugin_init(){
register_plugin("Respawn", "1.0", "razieljohn619")
register_event("DeathMsg", "death", "a")
register_event("Spectator", "event_spectator", "a")
register_clcmd("respawn", "respawns")
}
public death(){
static id
id = read_data(2)
if(id<1 || id>32)
return
if(!is_user_connected(id) || is_user_alive(id))
return
set_task(5.0, "respawns", id)
}
public respawns(id){
if(!is_user_connected(id) || is_user_alive(id))
return
dllfunc(DLLFunc_Spawn, id)
}
public event_spectator()
{
set_hudmessage(230 230 230, -1.0, 0.85, 0, 6.0, 5.0, 0.1, 0.2, -1)
show_hudmessage("/wPress /yX /wto respawn ")
}
//the "Press" message should be white,, "X" should be color yellow,, and "to respawn" is should be white..
NOTE: my server has respawn after 5 seconds after death, so if player can't wait., he'll just have to press X to respawn instantly..
__________________