SA-MP Forums Archive
robbery 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: robbery help (/showthread.php?tid=248183)



robbery help - CrazyBlob - 12.04.2011

ok so i made a /robbery and u can rob the store but how do i make it so if its being robbed no1 else can rob it at the same time? ty


Re: robbery help - Alby Fire - 12.04.2011

pawn Код:
//top of your script
new
    bool:robbing = false;
//into the /robbery command
  if(robbing == false) {
  robbing = true;
//into the script wich gives the money out at the end of the robbery
  robbing = false;



Re: robbery help - CrazyBlob - 12.04.2011

ok so when some1 types /robbery and i put robbing = true; itll set it for every1?


Re: robbery help - Alby Fire - 12.04.2011

Yes, that's a global variable.


Re: robbery help - CrazyBlob - 12.04.2011

ok thanks everymuch!!!