28.11.2009, 08:19
How do I make a command be available only after 10 seconds, for example if I type /tp to someone, then I can use /tp again only after 10 seconds.
new bool:variable[MAX_PLAYERS] = { true, ... };
//Under the command
if(variable[playerid] != false) {
SetPlayerPos(x, y, z..
SetTimerEx("AllowTeleport", 10000, 0, "i", playerid);
variable[playerid] = false;
}else SendClientMessage("you can teleport once every 10 seconds..
forward AllowTeleport(playerid);
public AllowTeleport(playerid) return variable[playerid] = true;