kr0wns Posted May 10, 2016 Share Posted May 10, 2016 Well, this no display the amount of money in my bank or wallet. Who can help, I appreciate it int cash = PED::GET_PED_MONEY(player); sprintf(buffer, "Cash $%d", cash); Link to comment Share on other sites More sharing options...
TriRozhka Posted May 10, 2016 Share Posted May 10, 2016 I think its applicable only to random peds, created by environment. When you kill people they drop some money. This value you will get using this function. leonardosc 1 Link to comment Share on other sites More sharing options...
Jitnaught Posted May 10, 2016 Share Posted May 10, 2016 Use STAT_GET_INT(Hash statHash, int *outValue, int p2) instead. const Hash PLAYER_ZERO = 0xD7114C9;const Hash PLAYER_ONE = 0x9B22DBAF;const Hash PLAYER_TWO = 0x9B810FA2;const Hash SP0_TOTAL_CASH = 0x324C31D;const Hash SP1_TOTAL_CASH = 0x44BD6982;const Hash SP2_TOTAL_CASH = 0x8D75047D;int GET_PLAYER_NUMBER() { switch (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID())) { case PLAYER_ZERO: return 0; case PLAYER_ONE: return 1; case PLAYER_TWO: return 2; } return -1;};int GET_PLAYER_CASH() { int plyCash = -1; switch (GET_PLAYER_NUMBER()) { case 0: STATS::STAT_GET_INT(SP0_TOTAL_CASH, &plyCash, -1); break; case 1: STATS::STAT_GET_INT(SP1_TOTAL_CASH, &plyCash, -1); break; case 2: STATS::STAT_GET_INT(SP2_TOTAL_CASH, &plyCash, -1); break; } return plyCash;} leonardosc 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