SA-MP Forums

SA-MP Forums (
-   Scripting Help (
-   -   better change climate (

idegod 03/12/2019 04:30 AM

better change climate
Is anyone got a better change climate?

I'm using this:
pawn Code:
// change climate
forward SetClima(); public SetClima()
    foreach(new i : Player) SetPlayerTime(i,server_hour,server_minute);

But day change to night too fast, it's not weird

Mattski 03/12/2019 09:28 AM

Re: better change climate
why don't you use gl_realtime?

idegod 03/12/2019 04:54 PM

Re: better change climate
this one?
it change weather just like mine

pawn Code:
foreach(new i : Player) SetPlayerTime(i,server_hour,server_minute);

i'm right?
the only difference is that they use real life time
i dont, i'm using server hour

the problem is: there is no transition

you are playing on day
and after some hour, boom, nigiht

there is no late afternoon

Mattski 03/12/2019 05:04 PM

Re: better change climate
create a loop setting player time, example setplayertime to 0 after 20min setplayertime to 1

idegod 03/12/2019 11:08 PM

Re: better change climate
What are u mean?
U think this function is not called in a good time?

Yes, it is, 5 seconds
SetTimer("SetClima", 5000, true);

And weather in game still changing to day for night
Without this transition

is just day to night

Mattski 03/12/2019 11:20 PM

Re: better change climate
Maybe i just didn't understand what were you saying

Vizi10 03/12/2019 11:43 PM

Re: better change climate
Where in the script do you set some value for the server_hour and server_minute variable?
So it's clear that if these two variables are 0 the time the players are going from day to night.

pawn Code:
gettime(server_hour, server_minute);
foreach(new i : Player) SetPlayerTime(i,server_hour,server_minute);

idegod 05/12/2019 03:03 AM

Re: better change climate
does it matter?
each 5 seconds add 1 server_minute
each 60 server_minutes (300 seconds, 5 minutes) add 1 server hour

the problem is there is no afternoon, it cut from day to night in one shot

idegod 05/12/2019 07:22 PM

Re: better change climate
ok i give up :(

All times are GMT. The time now is 11:08 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.