07.12.2008, 18:46
Like this
pawn Code:
if(strcmp(cmd, "/tod", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /tod [timeofday] (0-23)");
return 1;
}
new hour;
hour = strvalEx(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SetWorldTime(hour);
format(string, sizeof(string), " Time set to %d Hours.", hour);
BroadCast(COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Niste ovlasteni za koristenje ove komande !");
}
}
return 1;
}