Jupiter_Hortenzievich Posted October 27, 2019 Share Posted October 27, 2019 I currently started scripting GTA 5, and I don't know, how to get the current character. I'm not interested in getting the online character, I only need to determine, whether we are currently playing as Michael, Franklin, or Trevor. I'm currently using the following script to get the current character: Spoiler GET_NUMBER_OF_DRAWABLE_VARIATIONS(PLAYER_PED_ID(), 6) // This will get the number of available shoe/feet styles // Returns 22 for Michael, 20 for Franklin, and 21 for Trevor // This determines the current player I'd like to know, what is the most professional way of getting the current story-mode single player character, apart from this, and memory hacking. What mission scripting native function do they use for this in original GTA 5 mission script? Thanks Link to comment Share on other sites More sharing options...
Tanjitsu Posted December 13, 2019 Share Posted December 13, 2019 if (Function.Call<bool>(Hash.IS_PED_MODEL, Game.Player.Character.Handle, PedHash.Michael)) return "Michael"; if (Function.Call<bool>(Hash.IS_PED_MODEL, Game.Player.Character.Handle, PedHash.Trevor)) return "Trevor"; if (Function.Call<bool>(Hash.IS_PED_MODEL, Game.Player.Character.Handle, PedHash.Franklin)) return "Franklin"; Jupiter_Hortenzievich 1 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