/n chat help please
#1

name says it all, im working on a rp server but need help makeing a /n command that the player has to wait 30 seconds to use again unless they are a helper please help
Reply
#2

pawn Код:
new W30SEC;

CMD:n(playerid,params[])
{
    if(GetPVarInt("UsedCmd" == 1))
    {
        SendClientMessage(playerid,-1,"Wait! N00B!");
    }
    SetPVarInt("UsedCmd",1);
    W30SEC = SetTimer("Wait",30000,true);
    SendClientMessage(playerid,-1,"Yay, it r work!");
    return 1;
}

forward Wait();
public Wait()
{
    SetPVarInt("USedCmd",0);
    KillTimer(W30SEC);
    return 1;
}
Might work, I just did this quickly.
Reply
#3

SetTimer will make it globally. Use SetTimerEx instead if you want to make timer for only one player.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)