Health Check
#1

Hey, guys!
I'd like to have a testing on the player's health. I wrote a test code but there's a problem. After I spawned the tset mesage is sended but nothing more happens then. What could be wrong or what did I overlooked?
pawn Код:
new TST[MAX_PLAYERS];
new Float:OldHealth[MAX_PLAYERS];
forward TS();
public OnPlayerConnect(playerid){
OldHealth[playerid]=100.00;
return 1;
}
public OnPlayerSpawn(playerid){
TST[playerid]=SetTimer("TS",1000,1);
return 1;
}
public TS(){
for(new i=0;i<MAX_PLAYERS;i++)
{
new Float:NewHealth;
NewHealth=GetPlayerHealth(i,NewHealth);
if(OldHealth[i]>NewHealth){
OldHealth[i]=NewHealth;
SendClientMessage(i,RED,"Test Message!");
}
}
return 1;
}
Reply
#2

TST[playerid]=SetTimer("TS",1000,1);

shouldn't that be

TeamSpeakTimer[playerid]=SetTimer("TS",1000,1);

?
Reply
#3

Oops! Typo! xD
Reply
#4

Nobody knows what might be wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)