SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/12/2019, 04:30 AM   #1
idegod
Little Clucker
 
Join Date: Mar 2017
Posts: 43
Reputation: 0
Default 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
idegod is offline   Reply With Quote
Old 03/12/2019, 09:28 AM   #2
Mattski
Big Clucker
 
Mattski's Avatar
 
Join Date: Oct 2019
Location: Under Your Moms Bed
Posts: 147
Reputation: 1
Default Re: better change climate

why don't you use gl_realtime?
__________________
___________________________________________
LATVIA FREEROAM : Release 19.12.19
(first server creation)


MY WORK:
Player Name Tags - https://pastebin.com/xncXzr0R
Mattski is offline   Reply With Quote
Old 03/12/2019, 04:54 PM   #3
idegod
Little Clucker
 
Join Date: Mar 2017
Posts: 43
Reputation: 0
Default Re: better change climate

this one? https://github.com/Southclaws/samp-H...l_realtime.pwn
it change weather just like mine

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

https://github.com/Southclaws/samp-H...me.pwn#L46-L52

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
afternoon...
idegod is offline   Reply With Quote
Old 03/12/2019, 05:04 PM   #4
Mattski
Big Clucker
 
Mattski's Avatar
 
Join Date: Oct 2019
Location: Under Your Moms Bed
Posts: 147
Reputation: 1
Default Re: better change climate

create a loop setting player time, example setplayertime to 0 after 20min setplayertime to 1
__________________
___________________________________________
LATVIA FREEROAM : Release 19.12.19
(first server creation)


MY WORK:
Player Name Tags - https://pastebin.com/xncXzr0R
Mattski is offline   Reply With Quote
Old 03/12/2019, 11:08 PM   #5
idegod
Little Clucker
 
Join Date: Mar 2017
Posts: 43
Reputation: 0
Default 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
https://encrypted-tbn0.gstatic.com/i...IgOgzJsVQxng&s
https://i.ytimg.com/vi/WZ3TKP1asMg/hqdefault.jpg
https://sergiodantas.files.wordpress.../03/chamas.jpg

is just day to night
idegod is offline   Reply With Quote
Old 03/12/2019, 11:20 PM   #6
Mattski
Big Clucker
 
Mattski's Avatar
 
Join Date: Oct 2019
Location: Under Your Moms Bed
Posts: 147
Reputation: 1
Default Re: better change climate

Maybe i just didn't understand what were you saying
__________________
___________________________________________
LATVIA FREEROAM : Release 19.12.19
(first server creation)


MY WORK:
Player Name Tags - https://pastebin.com/xncXzr0R
Mattski is offline   Reply With Quote
Old 03/12/2019, 11:43 PM   #7
Vizi10
Huge Clucker
 
Join Date: May 2017
Location: Iran
Posts: 226
Reputation: 8
Default 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.

Use:
pawn Code:
gettime(server_hour, server_minute);
foreach(new i : Player) SetPlayerTime(i,server_hour,server_minute);
Vizi10 is offline   Reply With Quote
Old 05/12/2019, 03:03 AM   #8
idegod
Little Clucker
 
Join Date: Mar 2017
Posts: 43
Reputation: 0
Default 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 is offline   Reply With Quote
Old 05/12/2019, 07:22 PM   #9
idegod
Little Clucker
 
Join Date: Mar 2017
Posts: 43
Reputation: 0
Default Re: better change climate

ok i give up
idegod is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skin Change / pClass change DarknesS1988 Scripting Help 1 29/10/2018 07:21 PM
I need help here with / climate baela Scripting Help 2 01/07/2016 01:44 AM
Replace a car without moving, change speed, change the angle Justinlol Help Archive 5 14/08/2011 03:41 PM
Help - Each GG with climate and time specified brazumbi Help Archive 0 13/02/2011 10:41 PM
Little stupid question, but how to change the topic title? It doesn't change when I edit the first post Mean Everything and Nothing 6 29/01/2011 04:29 PM


All times are GMT. The time now is 06:29 PM.


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