jitsuin Posted January 3, 2012 Share Posted January 3, 2012 Yeah so I don't see how to change the in game time. Like if i want it to be night or morning. I tried using the native to unlock time but i dont think i was using it correctly. Can someone who knows how to do this give me some help so I can finish my trainer I am making. Thank you!! Link to comment Share on other sites More sharing options...
jitsuin Posted January 3, 2012 Author Share Posted January 3, 2012 This looks like it will answer my question Will try later! http://code.google.com/p/gta4modding/sourc...Scripting.h?r=5 Link to comment Share on other sites More sharing options...
motorsport71 Posted January 4, 2012 Share Posted January 4, 2012 if you still have problems try this, i'm using a SHDN and natives World.UnlockDayTime() wait(10) Dim h As Integer = World.CurrentDate.Hour ' to get current hour Dim m As Integer = World.CurrentDate.Minute 'to get current minute Native.Function.Call("SET_TIME_OF_DAY", h, m) If you choose to display it on screen it will give you current time. So if you want it to be, for instance, 8:12 p.m. World.UnlockDayTime() wait(10) Native.Function.Call("SET_TIME_OF_DAY", 20, 12) I like to add the small wait(10) milliseconds. I don't think it's necessary, but i also don't think it hurts anything. Link to comment Share on other sites More sharing options...
jitsuin Posted January 4, 2012 Author Share Posted January 4, 2012 (edited) Oh thank you for your reply but the native below works perfectly It was so easy i cant believe i had to ask. I just for some reason overlooked the native on gtamodding.com i used: GTA.Native.Function.Call("FORCE_TIME_NOW", hour, minute); thank u though Oh and i think your wait u use is a good idea. Once i learned to change time, i spammed the button like a hundred times to change time rapidly...lol...and the sky went crazy permanent after. Even when i stopped pressing button, the sky was flickering between night and day nonstop, i had to shut game down, lol. Good to give script some time between commands i think oh but i didnt see how to get current time or those other things u mentioned. I will test those out...thanks! Edited January 4, 2012 by jitsuin Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now