only one time the player can do the command - 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: only one time the player can do the command (
/showthread.php?tid=607423)
only one time the player can do the command -
Eymeric69 - 19.05.2016
Hey everybody
I want to do a command, when the player tape this command, he can't do it two time he can only do it one time how to do it ? i use MySQL ?
there is code :
PHP код:
COMMAND:alphajoueur(playerid, params[])
{
SendAdminText(playerid, "/alphajoueur", params);
// the code here ?
if (APlayerData[playerid][LoggedIn] == false) return 0;
SendClientMessage(playerid, 0xFFFFFFF,"Vous avez bien confirmez votre status de joueur alpha de truckingFR");
GivePlayerMoney(playerid, 850000);
return 1;
}
thank for help
Re: only one time the player can do the command -
Sjn - 19.05.2016
PHP код:
COMMAND:alphajoueur(playerid, params[])
{
SendAdminText(playerid, "/alphajoueur", params);
if (GetPVarInt(playerid, "CMD_Used") == 1)
return SendClientMessage(playerid, -1, "You can only use this command once.");
// the code here ?
if (APlayerData[playerid][LoggedIn] == false) return 0;
SendClientMessage(playerid, 0xFFFFFFF,"Vous avez bien confirmez votre status de joueur alpha de truckingFR");
GivePlayerMoney(playerid, 850000);
SetPVarInt(playerid, "CMD_Used", 1);
return 1;
}
Re: only one time the player can do the command -
Eymeric69 - 19.05.2016
thank you.