OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wildebeest on 27 Jan 2005, 23:33:21

Title: A money script?
Post 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.
Title: Re:A money script?
Post by: macguba on 28 Jan 2005, 01:21:29
This has been done, more than once.    Use the forum search function and see what you can find.
Title: Re:A money script?
Post by: Serial Killer on 29 Jan 2005, 10:31:20
I asked this a month ago.. You should find it!
Title: Re:A money script?
Post by: HuNtA on 29 Jan 2005, 12:56:08
hehe... Ill jus give a quick solution here (not to encourage not searching)

in init.sqs

Code: [Select]
man1money = 100
change 100 with whatever money I want em to have

then, in a buy script, put this somewhere

Code: [Select]
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
Title: Re:A money script?
Post by: Wildebeest on 30 Jan 2005, 12:08:30
Cool, thanks. I have searched and searched but I couldn't find anything. I'll try that stuff. Thanks.