SetWorldTime
#2

Just made it quick with zcmd, you just have to edit it for your needs and it should work... I haven't tested it!
You will need a sscanf plugin or include!
Код:
CMD:settime(playerid,params[])
{
	new time,string[128];
	if(!IsPlayerAdmin(playerid)) {
	    return /* not admin, put message here*/
	}
	if(sscanf(params,"d",time); {
	    return /* invalid syntax, putt message here */
	}
	if(time >= 0 && time < 24)
	{
	    SetWorldTime(playerid,time);
	    format(string,sizeof(string),"%s changed time, time is now %d hours!", PlayerName(playerid),time);
	    SendClientMessageToAll(COLOR_WHITE,string);
	    return 1;
	}
	else {
		/* invalid time, put message here */
	}
}


stock PlayerName(playerid)
{
	new name[24];
	GetPlayerName(playerid, name, sizeof(name));
	return name;
}
Reply


Messages In This Thread
SetWorldTime - by ludesert - 25.06.2011, 16:50
Re: SetWorldTime - by Willow - 25.06.2011, 17:43
Re : SetWorldTime - by ludesert - 25.06.2011, 18:55
Re : SetWorldTime - by ludesert - 25.06.2011, 19:09
Re : SetWorldTime - by ludesert - 25.06.2011, 20:02
Re: SetWorldTime - by iPLEOMAX - 25.06.2011, 20:23
Re : SetWorldTime - by ludesert - 25.06.2011, 20:31
Re: Re : SetWorldTime - by iPLEOMAX - 25.06.2011, 20:44
Re : SetWorldTime - by ludesert - 25.06.2011, 20:48
Re : SetWorldTime - by ludesert - 26.06.2011, 11:21

Forum Jump:


Users browsing this thread: 1 Guest(s)