Wiebrendh Posted March 26, 2014 Share Posted March 26, 2014 Is there any option to trigger an if statement when it is sunday 12 o'clock? Really need this for my mod Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted March 26, 2014 Share Posted March 26, 2014 (edited) Everything in GTA is done using native functions, you need to familiarize yourself with the following... Download ilspy (free, i use this) or .net reflector and decompile the scripthookdotnet.asi and then review all classes and functions inside the GTA namespace. You can also use this program to decompile anyone's .net gta scripts. This will give u ideas from modders who are more familiar with GTA. Download the GTAIV and EFLC SCO scripts decompiled with OpenIV (julionib provided a link on one of these threads) and the use a text searching app (write one) to look for natives and you can see how R* uses them. Look here... http://www.gtamodding.com/index.php?title=List_of_native_functions The c++ scripthook header file also has many documented natives... http://code.google.com/p/gta4modding/source/browse/trunk/ScriptHook/Scripting.h?r=5 More Natives here on another headerfile... http://code.google.com/p/gta4modding/source/browse/trunk/ScriptHook/ScriptingDirty.h?spec=svn5&r=5, the parameters are not reversed, but there are ways to figure out (guessing, looking at SCO or other people's code, reversing) I see you asking mostly basic stuff u accomplish by just being aware of a native so i think this info will help new modders like yourself. BTW i found what you were looking for using ilspy... so u can even see the GTA native being used... GetTimeOfDay But you wouldn't need to use the native since the maker of the scripthookdotnet already added for u to use... just call... World.CurrentDate (which is a DateTime object... google how to get the hour) Edited March 26, 2014 by LordOfTheBongs Link to comment Share on other sites More sharing options...
Wiebrendh Posted March 26, 2014 Author Share Posted March 26, 2014 When i do int Date = World.CurrentDate, it says: Cannot implicitly convert type 'System.DateTime' to 'int/floatt/string'.. Sorry, am a new starting coder Link to comment Share on other sites More sharing options...
LordOfTheBongs Posted March 26, 2014 Share Posted March 26, 2014 like i said... it is a DateTime object... google is your friend google "C# dotnetperls DateTime" 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