How can i create a cmd that can be used once in a while
#2

You can do something like this:

pawn Код:
CMD:giveallmoney(playerid, params[])
{
    if(IsPlayerAdmin(playerid)))
    {
        if(LastGiveAllMoney > gettime())
        {
               foreach(new i: Player)
               {
                    GivePlayerCash(i, 1000);
               }
               LastGiveAllMoney = gettime()+86400;
        }
        else return SendClientMessage(playerid, -1, "you can only do this every 24 hours !");
  }
   return 0;
}
Reply


Messages In This Thread
How can i create a cmd that can be used once in a while - by RTRSorin - 23.12.2014, 18:24
Re: How can i create a cmd that can be used once in a while - by Abagail - 23.12.2014, 18:29
Re: How can i create a cmd that can be used once in a while - by RTRSorin - 23.12.2014, 18:32
Re: How can i create a cmd that can be used once in a while - by Abagail - 23.12.2014, 18:39
Re: How can i create a cmd that can be used once in a while - by RTRSorin - 23.12.2014, 18:46

Forum Jump:


Users browsing this thread: 1 Guest(s)