Settimer help..
#1

Hi all,how i can stop a timer? for example when someone rob a store then:
if (strcmp("/rob", cmdtext, true, 10) == 0)
PHP код:
{
                if(
IsPlayerInRangeOfPoint(playerid4.01952.9886,1017.6065,992.4688))
                if(
robdragons[playerid] == 1)
                {
                
SetTimer("Binco"20000true);
                
SendClientMessage(playeridCOLOR_YELLOW" 20 seconds left");
                
RD[playerid] = 1;
                }
                else
                
SendClientMessage(playerid,COLOR_RED ,"[ERROR]You are not at a rob point (if you are new plese type /help)");
                return 
1;

When player type /rob then he wait 20 sec and and take money,but the timer still working and the player takes money every 20 seconds without need to type /rob!! How i can stop the timer??


Thanks,
jimis
Reply
#2

Here, read SAMP Wiki
https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

Ok thanks
Reply
#4

Ok,something else,how i can set many range points,for example
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1952.9886,1017.6065,992.468) and i want to set more lacations.
How i can do that
Reply
#5

If you want to make multiple location on one line

Example
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 4.0, 1952.9886,1017.6065,992.468) || IsPlayerInRangeOfPoint(playerid, 3.0,1528.4888,-1677.7632,5.8906)
"||" means or
Reply
#6

Ok thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)