doubt command
#1

this is my command to receive money how can i set a limit for them to put the command and wait so many minutes to put it back? thanks




CMD:recibirpaga(playerid,params[])
{
if(PlayerInfo[playerid][jMiembro] == 3)
{
DarDinero(playerid, 14000);
PlayerPlaySound(playerid,1139,0,0,0);
}
return 1;
}
Reply
#2

Code:
new MoneyLock[MAX_PLAYERS];
CMD:recibirpaga(playerid,params[])
{
if(PlayerInfo[playerid][jMiembro] == 3)
{
    if(MoneyLock[playerid] >= gettime()) return SendClientMessage(playerid, -1, "Command in Cooldown");
     MoneyLock[playerid] = gettime()+120; // 2 mins
    DarDinero(playerid, 14000);
    PlayerPlaySound(playerid,1139,0,0,0);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)