Time limiter for /rob help!
#4

pawn Код:
new Canrob[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/rob", true) == 0) // If they type /rob
  {
    if(IsPlayerInCheckpoint(playerid)) // Check if they are in a checkpoint
    {
        if(CanRob[playerid] == 1)
        {
          GivePlayerMoney(playerid, random(2000+1)); // Give the player the money!
              Canrob[playerid] = 0;
          SetTimerEx("CanRob",60000,false,"i",playerid);
          else return SendClientMessage(playerid,-1,"You must wait 60 seconds before robbing again!");
    }
    return 1; //return one to prevent "SERVER: Unknown command"
  }
  return 0;
}
forward CanRob(playerid);
public CanRob(playerid)
{
    Canrob[playerid] = 1;
    return 1;
}
Reply


Messages In This Thread
Time limiter for /rob help! - by Panormitis - 28.09.2011, 08:16
Re: Time limiter for /rob help! - by [Diablo] - 28.09.2011, 08:20
Re: Time limiter for /rob help! - by Panormitis - 28.09.2011, 09:33
Re: Time limiter for /rob help! - by [MWR]Blood - 28.09.2011, 09:36
Re: Time limiter for /rob help! - by suhrab_mujeeb - 28.09.2011, 09:39
Re: Time limiter for /rob help! - by iggy1 - 28.09.2011, 09:43
Re: Time limiter for /rob help! - by [Diablo] - 28.09.2011, 10:00
Re: Time limiter for /rob help! - by Panormitis - 28.09.2011, 10:10
Re: Time limiter for /rob help! - by iggy1 - 28.09.2011, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)