which function I have to use?
#1

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 0ectimer[playerid] = 25;
case 1ectimer[playerid] = 26;
case 2ectimer[playerid] = 24;
case 3ectimer[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
Reply
#2

Pastebin and indent it please...
Reply
#3

hmmh I just wondering the function so why u need it in to pastebin?
Reply
#4

Just use [pawn ][/pawn ] tags.

You can kill a timer by using KillTimer.
To check if a player is not there you can use

pawn Код:
{ else }
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))
Reply
#5

ty (8
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)