Jump to content
  • 0

Time


zroT

Question

1 answer to this question

Recommended Posts

//sus in script
new ICanUseCommand[MAX_PLAYERS];

//la onplayercommandtext
if(strcmp(cmdtext,"/command",true) == 0)
{
    if(ICanUseCommand[playerid] == 1)
    {
        //restul comenzii
        ICanUseCommand[playerid] = 0;
        SetTimerEx("NowICan",30000,0,"i",playerid);
    }
    else { SendClientMessage(playerid,COLOR_RED,"You can't use this command right now, wait some seconds!");
    return 1;
}

//pe la finalul scriptului
forward NowICan(playerid);
public NowICan(playerid) { ICanUseCommand[playerid] = 1; }

That's all :P

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.