Command Limit
#1

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
Reply
#2

You mean like using variables?
Reply
#3

Yeah
Reply
#4

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.
       }
}
Reply
#5

Thanks alot mate
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)