Settime command ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Settime command ? (
/showthread.php?tid=323905)
Settime command ? -
[LHT]Bally - 07.03.2012
can anyone help me with a settime command in zcmd.?
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;
};
}
i got this but i want it so that it says admin etc changed the time to hour minute
Re: Settime command ? -
Konstantinos - 07.03.2012
pawn Код:
CMD:settime( playerid, params[ ] )
{
new id, time;
if( sscanf( params, "ui", id, time ) ) return SendClientMessage( playerid, -1, "Usage: /settime <ID/Part Of Name> <0-24>" );
if( time > 24 || time < 0 ) return SendClientMessage( playerid, -1, "Available Hours: 0-24" );
SetPlayerTime( id, time );
return 1;
}
Re: Settime command ? -
[LHT]Bally - 07.03.2012
still doesnt work