SA-MP Forums Archive
How to make something like this :? - 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: How to make something like this :? (/showthread.php?tid=393298)



How to make something like this :? - ProdrifterX - 17.11.2012

Hello guys..
Iam thinking to make some command for my RP server like /getcash but player can use it only 1 time, but i dont have idea how to do it.. anyone knows?
Thank ya!


Re: How to make something like this :? - park4bmx - 17.11.2012

Make a variable
E.g
pawn Код:
new CashGiven[MAX_PLAYERS]=0;

//then on your cmd
{
if(CashGiven[playerid] == 1) return SendClientMessage(playerid,-1,"you can't use this command again!");
CashGiven[playerid]=1;
}
You can save that so next time you would know if the player used it or not