How to make a command availalbe only if 1 minute passed
#6

It's not that hard .. Only thing I need to know is if the timer has to be set on a global level, or per player.

pawn Код:
#define seconds 60

new bool:disabled;

if(!strcmp("/whatever", cmdtext, true))
{
  if(disabled == true) return SendClientMessage(playerid, COLOR_RED, "You can't do that command now!");
 
  // Commandlines
 
  SetTimer("EnableCommand", 1000*seconds, false);
  disabled = true;
  return 1;
}

forward EnableCommand();
public EnableCommand()
{
  disabled = false;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)