(if) jobs (restrictions) (eviction) and (cmds) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: (if) jobs (restrictions) (eviction) and (cmds) (
/showthread.php?tid=207905)
(if) jobs (restrictions) (eviction) and (cmds) -
Facepunch - 07.01.2011
Hi. I have made jobs and such for my script.
But I was wondering..
I know how to make a checkpoint job. I actually have allready.
But I want ONLY the person that has /takejob sweeper to be able to do /startsweep. How do I do this?
And How do I reject "citizens" if they enter the sweeeper?
Thanks
Re: (if) jobs (restrictions) (eviction) and (cmds) -
Lorenc_ - 07.01.2011
Make an if statement to this, if the player isnt a sweeper then eject from vehicle else return true...
eg:
pawn Код:
new bool: IsSweeper[MAX_PLAYERS];
//inside your sweeper callback that detects if the player is in it
if(IsSweeper[playerid] != true)
{
//reject the player
}
Ok. after that add to that line part where it shows if the player joins the job:
pawn Код:
IsSweeper[playerid] = true;
and when they leave:
pawn Код:
IsSweeper[playerid] = false
;
-Lorenc