how to script when player used command and he must wait untill ....
#3

Hmm,

Just make it call a timer:


pawn Код:
new UsedS[MAX_PLAYERS];
Under OnPlayerConnect
pawn Код:
UsedS[playerid] = 0;
Then Just make the command and check if UsedS is = 1, Else send them a message saying they cant do it

pawn Код:
dcmd_s(playerid, params[])
{
    if(UsedS[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You Must Wait 20 Secs);
    else
    {
          //Stuff In Here

        UsedS[giveplayerid] = 1; //Setting it to 1
        SetTimerEx("
STimer",20000,0,"i",playerid); //Setting A Timer
        return 1;
        }
        return 1;
    }
}
pawn Код:
forward STimer

public STimer(playerid);
{
   UsedS[playerid] = 0;
   SendClientMessage(playerid, COLOR_YELLOW, "You Can Use /s Now");
   return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)