SA-MP Forums Archive
Need help server time - 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: Need help server time (/showthread.php?tid=442091)



Need help server time - xF4Life - 05.06.2013

i have set my server weather to 0 and other numbers and when i try to change the time the server time dose not change help me lol


Re: Need help server time - DobbysGamertag - 05.06.2013

Show the command you used?


Re: Need help server time - bensmart469 - 05.06.2013

PHP код:
CMD:weather(playeridparams[])
{
    new 
amount;
    if(
sscanf(params"i"amount)) return SendClientMessage(playerid0xFFFFFFFF"USAGE: /weather [weatherid]");
    for(new 
i=0i<MAX_PLAYERSi++);
    {
        if(
IsPlayerConnected(i))
        {
            
SetWeather(amount);
            
serverweather amount;
        }
    }
    return 
1;

Try this


Re: Need help server time - xF4Life - 05.06.2013

Код:
CMD:setallweather(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 3) {
	    if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /setallweather [weather ID]");
		new var = strval(params), string[128];
       	CMDMessageToAdmins(playerid,"SETALLWEATHER");
		for(new i = 0; i < MAX_PLAYERS; i++) {
			if(IsPlayerConnected(i)) {
				PlayerPlaySound(i,1057,0.0,0.0,0.0);
				SetPlayerWeather(i, var);
			}
		}
		format(string,sizeof(string),"Administrator \"%s\" has set all players weather to '%d'", pName(playerid), var );
		return SendClientMessageToAll(blue, string);
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}

CMD:setalltime(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 3) {
	    if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /setalltime [hour]");
		new var = strval(params), string[128];
		if(var > 24) return SendClientMessage(playerid, red, "ERROR: Invalid hour");
       	CMDMessageToAdmins(playerid,"SETALLTIME");
		for(new i = 0; i < MAX_PLAYERS; i++) {
			if(IsPlayerConnected(i)) {
				PlayerPlaySound(i,1057,0.0,0.0,0.0);
				SetPlayerTime(i, var, 0);
			}
		}
		format(string,sizeof(string),"Administrator \"%s\" has set all players time to '%d:00'", pName(playerid), var );
		return SendClientMessageToAll(blue, string);
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}



Re: Need help server time - xF4Life - 05.06.2013

Quote:
Originally Posted by bensmart469
Посмотреть сообщение
PHP код:
CMD:weather(playeridparams[])
{
    new 
amount;
    if(
sscanf(params"i"amount)) return SendClientMessage(playerid0xFFFFFFFF"USAGE: /weather [weatherid]");
    for(new 
i=0i<MAX_PLAYERSi++);
    {
        if(
IsPlayerConnected(i))
        {
            
SetWeather(amount);
            
serverweather amount;
        }
    }
    return 
1;

Try this

this dont work