Need TRIGGER for when the Story Mode finish load player into world?
-
Scripting,ScriptHookVDotNet question...
what is the trigger for during the Story mode finish loads the player into the world?For example I need to spawn a vehicle at a location(eg neark Franklin house) when the game is loaded via Story Mode
-
@prontokar if i understand your question, finish the first mission and you can free roam. Or download a save game.
-
ah sorry I wasn't being really clear... actually I meant for scripting a ScriptHookV dll/asi
-
@prontokar are you asking how to spawn a character at a specific location on demand, or only when triggered by the conclusion of a mission, for example the end of the cutscene. Former is easy, latter I'll leave to an expert programmer.
-
Yes the latter...
I think a pseudocode would do itI just need to know some kind of event or trigger point I can use to start the spawn
OnGameStoreModeLoad { # need to know this one
Spawn(SULTAN,35,49,19); # I already know how to do this
}
-
@prontokar
I'm sorry but I'm getting really confused. If you're just waiting for the game to load, then just spawn the ped, no?
I thought you meant at a specific point in time, for example as an event is completed.If just when the game loads (which is the story mode) then with absolute coordinates for example:
Function.Call(Hash.SET_ENTITY_COORDS, PedPlayer, 250.0F, -878.0F, 30.0F, 0, 0, 1);
-
int _0xF2CA003F167E21D2() // 0xF2CA003F167E21D2 0x106C8317 b323
BOOL _LOADINGSCREEN_GET_LOAD_FREEMODE() // 0xEF7D17BC6C85264C 0xD87F3A9E b323
void _LOADINGSCREEN_SET_LOAD_FREEMODE(BOOL toggle) // 0xB0C56BD3D808D863 0xC0B971EA b323
BOOL _LOADINGSCREEN_GET_LOAD_FREEMODE_WITH_EVENT_NAME() // 0x8AA464D4E0F6ACCD 0x94BCAC7C b323
void _LOADINGSCREEN_SET_LOAD_FREEMODE_WITH_EVENT_NAME(BOOL toggle) // 0xFC309E94546FCDB5 0x7D90EEE5 b323
BOOL _LOADINGSCREEN_IS_LOADING_FREEMODE() // 0xC6DC823253FBB366 0x734CFEDA b323
void _LOADINGSCREEN_SET_IS_LOADING_FREEMODE(BOOL toggle) // 0xC7E7181C09F33B69 0x8C227332 b323
void _0xFA1E0E893D915215(BOOL toggle) // 0xFA1E0E893D915215 0x5C350D78 b323Experimenting with these Natives is probably a good starting point for you. No documentation on what they do so all you can do is try each and see what happens.
I would assume that _LOADINGSCREEN_GET_LOAD_FREEMODE will provide a true/false if the game is loading, which you can continuously check, then run the rest of your script as soon as it ticks to false.
The real question here is though, why do you need to wait for after the loading screen? Why not just run the script immediately?
-
@ItsJustCurtis Probably a language issue, because a script will run as soon as the game is loaded - no reason to ask if game is loaded when obviously it will be loaded in order for any script to run.
-
okay I feel dumb now hahah.. That just didn't cross my mind
... That the game with ScriptHookV would just start with the "hooked" script
.
@ItsJustCurtis said in Need TRIGGER for when the Story Mode finish load player into world?:
int _0xF2CA003F167E21D2() // 0xF2CA003F167E21D2 0x106C8317 b323
BOOL _LOADINGSCREEN_GET_LOAD_FREEMODE() // 0xEF7D17BC6C85264C 0xD87F3A9E b323
void _LOADINGSCREEN_SET_LOAD_FREEMODE(BOOL toggle) // 0xB0C56BD3D808D863 0xC0B971EA b323
BOOL _LOADINGSCREEN_GET_LOAD_FREEMODE_WITH_EVENT_NAME() // 0x8AA464D4E0F6ACCD 0x94BCAC7C b323
void _LOADINGSCREEN_SET_LOAD_FREEMODE_WITH_EVENT_NAME(BOOL toggle) // 0xFC309E94546FCDB5 0x7D90EEE5 b323
BOOL _LOADINGSCREEN_IS_LOADING_FREEMODE() // 0xC6DC823253FBB366 0x734CFEDA b323
void _LOADINGSCREEN_SET_IS_LOADING_FREEMODE(BOOL toggle) // 0xC7E7181C09F33B69 0x8C227332 b323
void _0xFA1E0E893D915215(BOOL toggle) // 0xFA1E0E893D915215 0x5C350D78 b323Experimenting with these Natives is probably a good starting point for you. No documentation on what they do so all you can do is try each and see what happens.
I would assume that _LOADINGSCREEN_GET_LOAD_FREEMODE will provide a true/false if the game is loading, which you can continuously check, then run the rest of your script as soon as it ticks to false.
Okay this might still be useful for my next script in mind thanks!