OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wildebeest on 27 Jan 2005, 23:33:21
-
Hi!
Guys you gotta help me. I wanna know how to make a money system in OFP. I want the player to be able to earn and spend money. Let's say he gets 40$ and then spends 20$. He should then have 20$ left. Simple as that.
-
This has been done, more than once. Use the forum search function and see what you can find.
-
I asked this a month ago.. You should find it!
-
hehe... Ill jus give a quick solution here (not to encourage not searching)
in init.sqs
man1money = 100
change 100 with whatever money I want em to have
then, in a buy script, put this somewhere
man1money = man1money -40change 40 with whatever price
If U wanna check the money, try this (untested)
man sidechat format ["I have %1 in my pocket",man1money]
email me if U want anymore help (davePAKAPali@hotmail.com
-
Cool, thanks. I have searched and searched but I couldn't find anything. I'll try that stuff. Thanks.