set time
#1

How can I create a command which sets the time of the server, so I can switch from night to day. I'd like to use zcmd, since that's easier.
Reply
#2

pawn Код:
CMD:settime(playerid, params[])
{
     new time;
     if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1 , "ERROR: use /settime [Hour]");
     if(time > 23 || time < 0) return SendClientMessage(playerid, -1, "ERROR: must be more than 0 and less than 24");
     SetWorldTime(time);
     return 1;
}
Reply
#3

Thanks, and this gonna change time for every player ? Or only for me ?
Reply
#4

It changes the world time on the server. So yes, it's going to change the time for everyone.
Reply
#5

Alright. Thanks again !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)