ok, heres the problem, i had this working earlier today to where it would actually count down the seconds left of godmode, but it doesnt now, it only displays the one time msg saying there is 10 seconds left of god mode, and craps out.. i added the server prints to try and debug it myself, to see what part of the code actually gets called, and whats bypassed, but im lost, ive even copied/pasted the code from above, (the first snippet), and it only counts once, im stumped, anyone have any suguestions as to what i should change/try?
Code:
<font color="#000000"><font color="#007700">new </font><font color="#0000bb">godloop</font><font color="#007700">[</font><font color="#0000bb">33</font><font color="#007700">]
</font><font color="#ff8000">#define GOD_LIFE 10
</font></font>
//machine mho_special
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,1)
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)
if (godloop[id] <= 1) {
server_print("--MHO MOD-- GOD MODE [FINISHED]",0.01)
Reset_GOD_loop(id)
} else {
//Hold_GOD(id)
server_print("--MHO MOD-- GOD MODE [HOLDING]",0.01)
}
return PLUGIN_HANDLED
}
public Reset_GOD_loop(id){
godloop[id] = 0
set_user_godmode(id)
server_print("--MHO MOD-- GOD MODE [OFF]",0.01)
}
__________________