AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   if(!is_user_alive) (https://forums.alliedmods.net/showthread.php?t=11688)

stigma 03-26-2005 09:53

if(!is_user_alive)
 
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 }

I have a task, that would set it to start.

Code:
set_task(3.0,"hudLoop",id,_,_,_,1)

KyleD 03-26-2005 18:55

What exactly is your problem? Explain more, and maybe we can help you.

stigma 03-27-2005 09:41

Well, when i am dead, there aint appearing that red 'DEAD' hud message.. And when im alive the green 'ALIVE' hud message aint appearing, thats my problem...

XxAvalanchexX 03-27-2005 18:20

Quote:

Originally Posted by stigma
there aint appearing that red 'DEAD' hud message..

Just had to quote that for lack of good grammar.

Quote:

Originally Posted by stigma
when im alive the green 'ALIVE' hud message aint appearing, thats my problem...

There is no 'ALIVE' hud message.

When is hudLoop being initiated?


All times are GMT -4. The time now is 09:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.