Yah its not very much different
You have to have separate publicvars for each player in init like:
player1cash = 4000
player2cash = 2000
etc.
And then create an actionmenu system for the thing, I did some menu based on the action window once and it can eventually get quite complex like with subdirectories, since you need to also have another script run with each to kill all the old actions, then create the new ones (that are in the menu) and then make some action, "back" which would then load the old list again.
ok thats overcomplexed talk
What I mean:
in init.sqs
buymenu = player addaction ["Buy Cars", "buymenu.sqs"]
etc for the initial options in player action menu, if you want em to appear near buildings for example then all you needed to do for that was to add that same line to that object instead, might be wrong here though as you might also have to add a distance check:
?(player distance vendor < 10): player addaction ["buy cars", "buymenu.sqs"]
in buymenu.sqs you'd have to then summon the allmighty list of new stuff, like:
?(checker1>=1): [] exec "emptier1.sqs",checker1= 0, exit
#buy_menu
buyjeep = player addaction ["BUY JEEP (400$)", "buyjeep.sqs"]
buytruck = player addaction ["BUY TRUCK (500$)", "buytruck.sqs"]
checker1 = checker1 + 1
exit
Now where it gets complex is when it comes to getting rid of all the older actions and stuff like that especially when you have several menus
thats why I added that checker var, to make sure I dont have the menu run twice or anything like that.
and this way I can also close the menu if I select it again, you can leave it out if you have it come up when you are close to some building and then add another line there:
?(player distance vendor > 10): [] exec "emptier1.sqs"
which would also exec the script emptier1.sqs where you could clean all the actions that shouldnt be there anymore (thats why its important to add IDs so you can kill the actions)
in emptier1.sqs
Player RemoveAction buyjeep
Player RemoveAction buytruck
exit
I think this should work
However in mp you need to be extra sure that some things dont get mixed up.
so its good to add checks like ?(side player == west): exit
depending on which side the script was ment for or:
?(player == playername) to make it player dependant.