06.06.2014, 19:14
pawn Код:
CMD:settime(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new hour, minute;
if(sscanf(params,"ii",hour,minute)) return SendClientMessage(playerid, 0xFFFFFFFF, "Useage: /settime [hour] [minute]");
format(TimeString,32,"%02d:%02d", hour, minute);
TextDrawSetString(TimeDisplay, TimeString);
for (new playerid; playerid < MAX_PLAYERS; playerid++)
{
if (IsPlayerConnected(playerid))
{
SetPlayerTime(playerid, hour, minute);
}
}
return 1;
}