Timer help
#1

I was playing around making a death system but why isn't this working at all?

Код:
 public DeathTimer(playerid)
{
   
	if(PlayerInfo[playerid][pDead] == 1)
	{
	if(PlayerInfo[playerid][pDeadTimer] == 0)
	{
	SpawnPlayer(playerid);
	PlayerInfo[playerid][pDead] = 0;
	}
	else
	{
	PlayerInfo[playerid][pDeadTimer]--;
	new string[128];
	format(string,sizeof(string),"You have %d seconds left", PlayerInfo[playerid][pDeadTimer]);
	SendClientMessage(i, COLOR_WHITE, string);
	}
	}
	
	SetTimer("DeathTimer", 1000, true);
}
Reply
#2

Should use SetTimerEx
Replace this
pawn Код:
SetTimer("DeathTimer", 1000, true);
With this:
pawn Код:
SetTimerEx("DeathTimer",1000,1,"i",playerid);
Reply
#3

I added it but it doesn't still say anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)