23.04.2011, 07:36
Heey guys
How can i make a command that you can use 1 time in 1 minute?
thanks Admigo!
How can i make a command that you can use 1 time in 1 minute?
thanks Admigo!
#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;
}
pawn Код:
|