raxp Posted July 27, 2020 Share Posted July 27, 2020 Still no way to enable the ability to use money for non-player models? I mean if I switch player to the MP model it seems that money functionality is disabled for them. SHVDN money property change do nothing. Link to comment Share on other sites More sharing options...
LeeC22 Posted July 27, 2020 Share Posted July 27, 2020 (edited) You can use this to do it https://www.gta5-mods.com/scripts/character-swap but that won't let you buy MP clothes, just let you do things that normally require money, like fairground rides, telescopes etc... Edit: Just noticed you can switch to the MP model hashes, so maybe you can buy MP clothes... not sure, haven't used it for years. Edited July 27, 2020 by LeeC22 Link to comment Share on other sites More sharing options...
raxp Posted July 27, 2020 Author Share Posted July 27, 2020 Yeah, I know about character swap and actually able to do something similar through the code. I'm working on some script that involves MP (well, not only MP) character creation. Sure I can make my own money system that utilizes a variable for it and draw a text in the same place where money status usually appears, but it is not native, so to speak. For example, pause menu will still show SP player money and all custom scripts that use money properties of the character will still do nothing. Link to comment Share on other sites More sharing options...
LeeC22 Posted July 27, 2020 Share Posted July 27, 2020 (edited) 2 hours ago, Raxp said: Yeah, I know about character swap and actually able to do something similar through the code. I'm working on some script that involves MP (well, not only MP) character creation. Sure I can make my own money system that utilizes a variable for it and draw a text in the same place where money status usually appears, but it is not native, so to speak. For example, pause menu will still show SP player money and all custom scripts that use money properties of the character will still do nothing. I had exactly the same problem when I wrote my mod to extend the playable features of addon peds. I ended up creating my own money & health system (because I wanted them persistent across game sessions) along with their own character wheel... but as you say, it still shows SP money in the pause menu, along with the last main character's name you were playing as. Maybe you could edit pausemenu.xml to hide that money/name section, it's not a file I have ever looked very closely at. If you could find a way of hooking into any native calls that changed the player's money, you could possibly intercept them and re-route that money into your own money system if you weren't a main character. ScriptHookV must know what natives have been called and the parameters they have been called with, so maybe it's possible. That's beyond my ability-level though. Edit: Rockstar have very nicely added some interesting info into pausemenu.xml, including some Flags info: ====== INTERESTING FLAGS ======= kNoBackground Has no background kNotDimmable Starts undimmed kFadesIn Fades in over time kNoPlayerInfo No "Thing in the corner" kTabsAreColumns Screen is "one screen" without tabs that change the full thing Just below that is a section named FE_MENU_VERSION_SP_PAUSE and there are a set of <VersionFlags> for each section. Adding kNoPlayerInfo into the VersionFlags for that, hides the player info in the top-right corner when you pause the game... or the "Thing in the corner" as they call it. I am definitely going to add that to my game, as that hides the one visible link to the main characters when I am playing as addon-peds. Be even better if that was scriptable through a scaleform function. Edited July 27, 2020 by LeeC22 raxp 1 Link to comment Share on other sites More sharing options...
raxp Posted July 28, 2020 Author Share Posted July 28, 2020 Quote For example, pause menu will still show SP player money and all custom scripts that use money properties of the character will still do nothing. Answering to myself about that. SHVDN won't let you do that anyway. Money setter from Player class writes money to the stats and ignores everyone who doesn't have a player model hash. That's why no difference I had when I tried to add money to the MP player. switch ((PedHash)Character.Model.Hash) { case PedHash.Michael: stat = Game.GenerateHash("SP0_TOTAL_CASH"); break; case PedHash.Franklin: stat = Game.GenerateHash("SP1_TOTAL_CASH"); break; case PedHash.Trevor: stat = Game.GenerateHash("SP2_TOTAL_CASH"); break; default: return; } Function.Call(Hash.STAT_SET_INT, stat, value, 1); Ped class instead uses GET_PED_MONEY and SET_PED_MONEY. public int Money { get => Function.Call<int>(Hash.GET_PED_MONEY, Handle); set => Function.Call(Hash.SET_PED_MONEY, Handle, value); } Still nativedb says that only $2000 MP characters can have, as it is supposed to be the money ped can drop if killed. Quote Maximum possible amount of money on MP is 2000. ~JX ----------------------------------------------------------------------------- Maximum amount that a ped can theoretically have is 65535 (0xFFFF) since the amount is stored as an unsigned short (uint16_t) value. 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