/settime command
#4

Hi,
Here is a Command for Rcon:

pawn Код:
dcmd(settime, 7, cmdtext);
pawn Код:
dcmd_settime(playerid,params[])
{
    new string[256],idx,tmp[256];
    if(IsPlayerAdmin(playerid))
    {
      tmp = strtok(params,idx);
      if(!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_RED, "ERROR: /settime [hour]");
        return 1;
        }
      new h = strval(tmp);
      if(h < 0 || h > 24)
      {
        SendClientMessage(playerid, COLOR_RED, "ERROR: /settime [hour]");
        return 1;
        }
        SetWorldTime(h);
        format(string,sizeof(string), "Admin %s has change the Time to %d !", GetName(playerid), h);
        SendAllEMessage(string);
    }
     else
     {
      SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a Admin to use this Command !");
      return 1;
    }
    return 1;
}
pawn Код:
stock GetName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));

    return name;
}
Regards,
- LJ
Reply


Messages In This Thread
/settime command - by [MLT]Marco - 20.02.2009, 12:46
Re: /settime command - by MenaceX^ - 20.02.2009, 13:30
Re: /settime command - by [MLT]Marco - 20.02.2009, 14:09
Re: /settime command - by Littl3j0hNy - 20.02.2009, 14:15
Re: /settime command - by Donny_k - 20.02.2009, 14:52
Re: /settime command - by Littl3j0hNy - 20.02.2009, 14:54
Re: /settime command - by Donny_k - 20.02.2009, 15:09
Re: /settime command - by [MLT]Marco - 20.02.2009, 15:16
Re: /settime command - by Littl3j0hNy - 20.02.2009, 15:17
Re: /settime command - by Donny_k - 20.02.2009, 15:33
Re: /settime command - by Littl3j0hNy - 20.02.2009, 15:42
Re: /settime command - by Donny_k - 20.02.2009, 16:10
Re: /settime command - by [MLT]Marco - 20.02.2009, 16:18
Re: /settime command - by Daren_Jacobson - 20.02.2009, 16:23
Re: /settime command - by Littl3j0hNy - 20.02.2009, 16:55
Re: /settime command - by [MLT]Marco - 20.02.2009, 17:06
Re: /settime command - by Daren_Jacobson - 20.02.2009, 17:52
Re: /settime command - by Donny_k - 20.02.2009, 17:53
Re: /settime command - by Jason_Borne420 - 03.07.2009, 03:27
Re: /settime command - by Blacklite - 03.07.2009, 04:20
Re: /settime command - by Andom - 03.07.2009, 07:24
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:07
Re: /settime command - by refshal - 03.07.2009, 08:16
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:40
Re: /settime command - by refshal - 03.07.2009, 08:42
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:45
Re: /settime command - by refshal - 03.07.2009, 08:47
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:49
Re: /settime command - by refshal - 03.07.2009, 08:50
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:51
Re: /settime command - by @TheShadow@ - 03.07.2009, 08:55
Re: /settime command - by refshal - 03.07.2009, 09:11
Re: /settime command - by Jason_Borne420 - 19.10.2009, 02:45
Re: /settime command - by homijs - 12.09.2010, 20:07
Respuesta: /settime command - by Alex_Obando - 03.04.2011, 19:17

Forum Jump:


Users browsing this thread: 4 Guest(s)