07.03.2012, 13:02
can anyone help me with a settime command in zcmd.?
i got this but i want it so that it says admin etc changed the time to hour minute
pawn Код:
COMMAND:settime(playerid, params[])
{
new time, Name[24], string[128];
SendAdminText(playerid, "/settime", params);
{
if(APlayerData[playerid][PlayerLevel] < 1) return SendClientMessage(playerid,-1, "{ff0000}You are not admin");
GetPlayerName(playerid, Name, sizeof(Name));
if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1, "Usage: /settime [time]");
if(time > 24 || time < 0) return SendClientMessage(playerid, -1, "Error: Invalid time!");
SetWorldTime(time);
format(string, 128, "{ff0000}Admin %s Has changed the server time", Name);
SendClientMessageToAll(0xff00FF,string);
}
return 1;
};
}