Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Storymode money for non-player?


raxp
 Share

Recommended Posts

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

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 by LeeC22
Link to comment
Share on other sites

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

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 by LeeC22
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.