SRIV Add money through stores.

Hi, I was wondering if it's possible to add money to the player through a store. I have setup everything needed to sell something such as the menus and prompts. I have tried cash_add(1000, LOCAL_PLAYER), but that didn't work and I can't find any relevant functions in the store code to add money to the player.
 
You might try just cash_add(1000) - it looks like the second parameter is optional and should default to player1.

Edit: though from a quick look, I'm not convinced that function is available in store scripts - it's only available in the gameplay context from what I can see.
 
Thanks Minimaul. I tried just cash_add(1000) anyway and it doesn't do anything.

My original idea was to create a new option in Rim Jobs that allowed players to sell their vehicles and the amount it would sell for would depend on how customised the vehicle is.
 
You might try just cash_add(1000) - it looks like the second parameter is optional and should default to player1.

Edit: though from a quick look, I'm not convinced that function is available in store scripts - it's only available in the gameplay context from what I can see.
Looking at this script's code, it looks like positive values would add cash and negative should remove them. I'm unsure about what context is it available from though.

I already tried that and unfortunately it just crashes the game.
If you want to upload the version that crashes I can try to see what is going on with it.
 
Back
Top