which function I have to use? -
the_zande - 21.04.2011
Okay so I have timer on interior and when player go out of the interior I want it to kill the timer... but I dont really know how I can do it?
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/holdup", true))
{
if(!IsPlayerInRangeOfPoint(playerid, 10, 370.6117, -6.0165, 1001.8589)) return SendClientMessage(playerid,0xFF0000AA,"ERROR : You Have To Be In Cluckin' bell");
{
SetPlayerWantedLevel(playerid, 4);
}
new string[128];
switch(random(4))
{
case 0

ectimer[playerid] = 25;
case 1

ectimer[playerid] = 26;
case 2

ectimer[playerid] = 24;
case 3

ectimer[playerid] = 27;
}
format(string,sizeof(string),"%d second",sectimer[playerid]);
GameTextForPlayer(playerid,string,1000,4);
timer[playerid] = SetTimerEx("CountTimer",1000,true, "i",playerid);
return 1;
}
So when player is not in that point, timer must stop and ehhh that is it what im looking for how I can do it

D
Re: which function I have to use? -
linuxthefish - 21.04.2011
Pastebin and indent it please...
Re: which function I have to use? -
the_zande - 21.04.2011
hmmh I just wondering the function so why u need it in to pastebin?
Re: which function I have to use? -
alpha500delta - 21.04.2011
Just use [pawn ][/pawn ] tags.
You can kill a timer by using
KillTimer.
To check if a player is not there you can use
Under it and putting something under it. You can also check if the player is NOT in the area by doing this:
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, range, x, y, z))
Re: which function I have to use? -
the_zande - 21.04.2011
ty (8