21.04.2011, 19:55
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
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