only one time the player can do the command
#1

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

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;
} 
Reply
#3

thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)