OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Ding on 20 Jun 2005, 06:33:04

Title: Money system
Post by: Ding on 20 Jun 2005, 06:33:04
this has probably been asked about before but i searched the forum and dident find much. What i want to do is have a kind of money system, where say yo uactivate a trigger it goes up by 100, i think this gan be done with logics, but i do not know how to make the money go up, e.g. i can set it to a certain number to start with like startmoney = 100, but  idont know how to make it increase from the current number with another command, can someone help me please :)
Title: Re:Money system
Post by: j-man on 20 Jun 2005, 07:31:32
startmoney = startmoney + 100

Now you'll be $100 richer  ;)
Title: Re:Money system
Post by: Ding on 20 Jun 2005, 16:47:54
thanks :D will this work in multiplayer as i know ofp has its  probelms with logics through multiplayer
Title: Re:Money system
Post by: Chris Death on 20 Jun 2005, 17:17:31
startmoney = startmoney + 100; publicVariable "startmoney"

now you're $100 richer and everybody knows  ;)

~S~ CD
Title: Re:Money system
Post by: Ding on 21 Jun 2005, 21:34:26
thanks, i was going to ask about that :D
Title: Re:Money system
Post by: Ding on 22 Jun 2005, 20:09:35
New questio nrelated to this, how do  i get it to desplay the amount of money to the player when the logic which plus 50's the total amount of money is activated, as in how do i get it to show the current amount of players money?