ive searched hi/high and low for a better way to do this, but im stumped.
when a user types mho_special in console, it executes this:
PHP Code:
[small]
new godloop[33]
#define GOD_LIFE 10
public MHO_GOD_Mode(id){
godloop[id] = GOD_LIFE
//Hold_GOD(id)
//set_task(1.0,"Reset_GOD_loop",id)
set_task(1.0,"Hold_GOD",id)
}
public Hold_GOD(id){
if (godloop[id] != 1)
set_user_godmode(id,0)
server_print("--MHO MOD-- GOD MODE [ON]",0.01)
new message[128]
format(message, 127, "%d seconds left of GOD Mode.^n", godloop[id] )
set_hudmessage(255,0,0,-1.0,0.3,0,1.0,1.2,0.0,0.0,87)
show_hudmessage( id, message)
//godloop[id]--
//emit_sound(id,CHAN_VOICE,"misc/mysound.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
//Hold_GOD(id)
if (godloop[id] <= 1) {
Reset_GOD_loop(id)
}
return PLUGIN_HANDLED
}
public Reset_GOD_loop(id){
godloop[id] = 0
set_user_godmode(id)
server_print("--MHO MOD-- GOD MODE [OFF]",0.01)
}
[/small]
any other ideas? for some reason this really just doesnt even set godmod to on, it claims it does, and as far as ive read u set 0, and bam, ur god, if the second parm is not set, its off, the console never gets to display when its set off, because i got killed too fast, so im just like yea ok F U TOO fun include... F U! heh
__________________