29.11.2011, 13:58
pawn Код:
new tmp[256],cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/settime", true)==0)
{
if(!IsPlayerAdmin(playerid)) return 0;
else
tmp = strtok(cmdtext, idx);
new time;
time = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,0xFFFFFFFF, "USAGE: /settime [0-24]");
format(string, sizeof(string), "The Admin has set the time to %d.", time);
SendClientMessageToAll(0xFFFFFFFF, string);
SetWorldTime(time);
return 1;
}