#1

Hey, i need a command to set the time and also to change the weather.
Would be cool if anybody can give me that in a FS.
Reply
#2

Scripting help not scripting request
Reply
#3

use
PHP код:
SetWorldTime 
and
PHP код:
SetWeather 
Reply
#4

Yeah all cool, just asked if anybody here has got the command or maybe a filterscript with both.
Reply
#5

i basically told you the exact thing to use.
is it that hard?
Reply
#6

I just asked if anybody of you got the code, but chill i will create it bymself if noone of u got it.
Reply
#7

you can simply change a weather from RCON (/rcon weather [ID])
Reply
#8

If you want it only for the playerid:

PHP код:
CMD:changemyweather(playeridparams[])
{
    new 
weatherstring[128];
    if(
sscanf(params"i"weather)) return SendClientMessage(playerid0xf8f8f8fff"Syntax: {f00f00}/changemyweather <0 - 45>");
    if(
weather || weather 45) return SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Invalid Weather! <0 - 45>");
    
SetPlayerWeather(playeridweather);
    
format(stringsizeof(string), "{ff0ff0}Your Weather has changed to Weather %d!",weather);
    
SendClientMessage(playerid0xf8f8f8fffstring);
    return 
1;
}
CMD:changemytime(playeridparams[])
{
    new 
timeestring[128];
    if(
sscanf(params"i"timee)) return SendClientMessage(playerid0xf8f8f8fff"Syntax: {f00f00}/changemytime <0 - 23>");
    if(
timee || timee 23) return SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Invalid Time <0 - 23>.");
    
format(stringsizeof(string), "{ff0ff0}Your time has changed to %d!",timee);
    
SendClientMessage(playerid0xf8f8f8fffstring);
    
SetPlayerTime(playeridtimee0);
    return 
1;

Reply
#9

Or if you want it for the whole players and controlled by an admin:

PHP код:
CMD:changeweather(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    {
    new 
weatherstring[128];
    if(
sscanf(params"i"weather)) return SendClientMessage(playerid0xf8f8f8fff"Syntax: {f00f00}/changemyweather <0 - 45>");
    if(
weather || weather 45) return SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Invalid Weather! <0 - 45>");
    for(new 
0<= MAX_PLAYERSi++)
    {
        
SetPlayerWeather(i,weather);
        
format(stringsizeof(string), "{} {f00f00}an admin has changed the weather to %d!",weather);
        
SendClientMessage(i0xf8f8f8fffstring);
    }
    }
    else
    {
        
SendClientMessage(playerid,0xf8f8f8fff,"ERROR: {f00f00}You are not allowed to use this command!");
    }
    return 
1;
}
CMD:changetime(playeridparams[])
{
    if(
IsPlayerAdmin(playerid))
    {
    new 
timestring[128];
    if(
sscanf(params"i"time)) return SendClientMessage(playerid0xf8f8f8fff"Syntax: {f00f00}/changetime <0 - 23>");
    if(
time || time 23) return SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Invalid time! <0 - 23>");
    for(new 
0<= MAX_PLAYERSi++)
    {
        
SetPlayerTime(i,time);
        
format(stringsizeof(string), "{} {f00f00}an admin has changed the time to %d!",time);
        
SendClientMessage(i0xf8f8f8fffstring);
    }
    }
    else
    {
        
SendClientMessage(playerid,0xf8f8f8fff,"ERROR: {f00f00}You are not allowed to use this command!");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)