Command
#1

Heey guys
How can i make a command that you can use 1 time in 1 minute?

thanks Admigo!
Reply
#2

pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS GetMaxPlayers()

new bool:Val[MAX_PLAYERS] = false;
forward Aval(playerid);

public OnPlayerCommandText(playerid, params[])
{
    dcmd(command, 7, cmdtext);
    return 0;
}

dcmd_command(playerid, params[])
{
    if(val[playerid] == true) return SendClientMessage(playerid, COLOUR, "Disabled");
    val[playerid] = false;
    SetTimerEx("Aval", 60000, false, "i", playerid);
    //The rest of your code below
}

public Aval(playerid)
{
    val[playerid] = true;
}
Something like that, not sure if it works though, as i haven't tested it.
Reply
#3

Quote:
Originally Posted by funky1234
Посмотреть сообщение
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS GetMaxPlayers()

new bool:Val[MAX_PLAYERS] = false;
forward Aval(playerid);

public OnPlayerCommandText(playerid, params[])
{
    dcmd(command, 7, cmdtext);
    return 0;
}

dcmd_command(playerid, params[])
{
    if(val[playerid] == true) return SendClientMessage(playerid, COLOUR, "Disabled");
    val[playerid] = false;
    SetTimerEx("Aval", 60000, false, "i", playerid);
    //The rest of your code below
}

public Aval(playerid)
{
    val[playerid] = true;
}
Something like that, not sure if it works though, as i haven't tested it.
Thank you so much dude!
Reply
#4

No problem
Reply
#5

With timer

Edit: Odamn u fast
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)