Command available
#1

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.
Reply
#2

Make a variable
pawn Код:
new bool:variable[MAX_PLAYERS] = { true, ... };
pawn Код:
//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..
pawn Код:
forward AllowTeleport(playerid);

public AllowTeleport(playerid) return variable[playerid] = true;

Reply
#3

How exactely, its about /countdown not /tp sry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)