16.10.2010, 05:14
Hey guys,
I'm new to zcmd, if you guys can just check over my code for changing the time of day, because I don't think it's functioning properly
Thanks!
I'm new to zcmd, if you guys can just check over my code for changing the time of day, because I don't think it's functioning properly

pawn Код:
command(tod, playerid, params[])
{
new hour;
if(PlayerStatistics[playerid][pAdminLevel] >= 5) return 1;
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tod [timeofday] (0-23)");
if(!IsPlayerConnectedEx(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to login first before you can use this command!");
SetWorldTime(hour);
format(string, sizeof(string), "The weather has been set by Administrator %s.", hour);
SendClientMessageToAll(COLOR_DORANGE, string);
return 1;
}