SA-MP Forums Archive
Game 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Game time? (/showthread.php?tid=146976)



Game time? - MWF2 - 09.05.2010

How can I Make it so that lets say the 24/7 store is closed from a certain game time to a certain game time?


So lets say 6 - 12?





Re: Game time? - Miguel - 10.05.2010

And then...?


Re: Game time? - MWF2 - 10.05.2010

Quote:
Originally Posted by SAWC™
And then...?
So basically, I'm trying to make it so a store will be open from a certain time to a certain time. And closed from a certain time to a certain time.


Re: Game time? - luigifan9 - 10.05.2010

Quote:
Originally Posted by MWF2
Quote:
Originally Posted by SAWC™
And then...?
So basically, I'm trying to make it so a store will be open from a certain time to a certain time. And closed from a certain time to a certain time.
Use a timer to disableinteriorexits (somethinglikethat)


Re: Game time? - MWF2 - 10.05.2010

Quote:
Originally Posted by luigifan9
Quote:
Originally Posted by MWF2
Quote:
Originally Posted by SAWC™
And then...?
So basically, I'm trying to make it so a store will be open from a certain time to a certain time. And closed from a certain time to a certain time.
Use a timer to disableinteriorexits (somethinglikethat)
I'm sorry, I should be more clear lol.


I'm trying to make my bank open from say 3:00 to 6:00 and closed if not in between those times. The checkpoint should display "the bank is closed right now come back later" If i disabled interior exits, it would disable every stores enter/exit.


Re: Game time? - MWF2 - 10.05.2010

Quote:
Originally Posted by Seif_
Use a timer or, if you're using game time, use gettime. Though I would just recommend a timer to save the hassle.
So basically create a fresh global variable that's set to 1 by default, which means the bank is open. Then when it's closed, set it to 0 and set a timer that will set it back to 1 in 3 hours or whatever you want.
Lol, when you say it like that i feels like it's impossible LOL


I'm trying to use the game time clock at the top right. So how would i check to see what time it is on the clock?


Re: Game time? - Backwardsman97 - 10.05.2010

Well that clock doesn't work by default. You would have to have a script somewhere powering it that would have the time of it.


Re: Game time? - MWF2 - 10.05.2010

Quote:
Originally Posted by Baked-Banana
Well that clock doesn't work by default. You would have to have a script somewhere powering it that would have the time of it.
It does work by default doesn't it?

TogglePlayerClock(playerid, 1); is what i have in my script. Only thing related to the clock.


Can someone show me How i may check the time, I can do the closed and open part.


Re: Game time? - Backwardsman97 - 10.05.2010

Oh. TogglePlayerClock makes the clock show up and work but the time is not synced up for players. https://sampwiki.blast.hk/wiki/TogglePlayerClock I thought it didn't work by default because I had always used a script to set the time.


Re: Game time? - MWF2 - 10.05.2010

Quote:
Originally Posted by Baked-Banana
Oh. TogglePlayerClock makes the clock show up and work but the time is not synced up for players. https://sampwiki.blast.hk/wiki/TogglePlayerClock I thought it didn't work by default because I had always used a script to set the time.
Can you supply a link to me for the time? So i can fix it lol..