SA-MP Forums Archive
Command Limit - 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: Command Limit (/showthread.php?tid=442396)



Command Limit - jackci - 07.06.2013

Hello,

Sorry for the stupid question, but how do I make a command limit ? If a player used a command 3 times he cannot use it anymore for example


Re: Command Limit - CrazyChoco - 07.06.2013

You mean like using variables?


Re: Command Limit - jackci - 07.06.2013

Yeah


Re: Command Limit - gtakillerIV - 07.06.2013

pawn Код:
new clickedtimes[MAX_PLAYERS];
pawn Код:
CMD:balh(playerd, params[])
{
    if(clickedtimes[playerid] == 3)
    {
        //He can't use it anymore.
     }
      else
      {
            //He can use the CMD.
            clickedtimes[playerid]++; // Increasing integer by 1.
       }
}



Re: Command Limit - jackci - 07.06.2013

Thanks alot mate