Can sombody help me here? - I got problems in the "if" section.
Code:
public hudLoop(id) {
if(!is_user_alive(id)) {
remove_task(id)
set_task(0.5,"hudDead",id)
}
if(is_user_alive(id)) {
remove_task(id)
set_task(1.0,"hudAlive",id)
}
return PLUGIN_CONTINUE
}
public hudDead(id) {
set_hudmessage(255, 0 , 0, 0.00, 0.50, 0, 0.0, 0.1, 0.2, 0.2, 10)
show_hudmessage(id,"DEAD")
return PLUGIN_HANDLED
}
public hudAlive(id) {
new ping, loss
get_user_ping(id,ping,loss)
set_hudmessage(0, 0 , 255, 0.00, 0.50, 0, 0.0, 1.0, 0.0, 0.0, 10)
show_hudmessage(id,"Ping: %i^nLoss: %i", ping, loss)
return PLUGIN_HANDLED
}
Code:
set_task(3.0,"hudLoop",id,_,_,_,1)