SA-MP Forums Archive
Settimer help.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Settimer help.. (/showthread.php?tid=348639)



Settimer help.. - jimis - 06.06.2012

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


Re: Settimer help.. - Infinity90 - 06.06.2012

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


Re: Settimer help.. - jimis - 06.06.2012

Ok thanks


Re: Settimer help.. - jimis - 06.06.2012

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


Re: Settimer help.. - Neo Karls - 06.06.2012

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


Re: Settimer help.. - jimis - 06.06.2012

Ok thanks