Home   Help Search Login Register  

Author Topic: Money system...  (Read 5102 times)

0 Members and 1 Guest are viewing this topic.

Waterman

  • Guest
Re:Money system...
« Reply #15 on: 25 Mar 2003, 19:53:54 »
I think I get what you mean... just need to clarify some stuff... ;)

Code: [Select]
["init",unitname,startinMoneyAmmount(number)] exec "LCD_Swiss_Bank.sqs" Does that go in the persons init field or someplace else like the init.sqs?

and...
Code: [Select]
["show",unitname] exec "LCD_Swiss_Bank.sqs"where does that go? How do you get that option in the action menu?

and...
Code: [Select]
["add_remove",unitname,ammount(can b negative number or positive number)] exec "LCD_Swiss_Bank.sqs"I take thats for if someone wants to buy a car say... so you would use a negative number to subtract money from a players account.  For wages you would use same code but use positive number, right? ???

And what is this "action menu" script your talking about?

Sorry for being a pain. I can usually understand you but when you talk about scripting and type like that, it gets hard to understand... ;) ;D

Cheers,
Waterman. ::)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #16 on: 25 Mar 2003, 22:29:54 »
lol ;D k here is wat u need ;D

1. Yes

2. make action like : show money (or somin like dat) and in da action script do

Code: [Select]
["show",_this select 1] exec "LCD_Swiss_Bank.sqs"
exit

3. yes

4. just 2 buy da line u need is (in da action script)

["add_remove",_this select 1,ammount(can b negative number or positive number)] exec "LCD_Swiss_Bank.sqs"

so every1 who uses da action pays from his own money ;D

:cheers:

btw u have 2 put LCD_Swiss_Bank=[] in da init.sqs

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Waterman

  • Guest
Re:Money system...
« Reply #17 on: 26 Mar 2003, 17:49:18 »
It's giving me all sorts of errors... ::)

For a start is doen't like when you use "_this select 1"

I created a script called "action.sqs" and put this in it:
Code: [Select]
["show money",player5] exec "LCD_Swiss_Bank.sqs"
["add_remove",player5,20000] exec "LCD_Swiss_Bank.sqs"
exit

where player5 is me.
When I try and activate it via a trigger "On Activation field" using "[] exec action.sqs", I get an error message.

For this init.sqs I put:
Code: [Select]
LCD_Swiss_Bank=[]
["init",player1,100000] exec "LCD_Swiss_Bank.sqs"
["init",player2,100000] exec "LCD_Swiss_Bank.sqs"
["init",player3,100000] exec "LCD_Swiss_Bank.sqs"
["init",player4,100000] exec "LCD_Swiss_Bank.sqs"
["init",player5,100000] exec "LCD_Swiss_Bank.sqs"
["init",player6,100000] exec "LCD_Swiss_Bank.sqs"
["init",player7,100000] exec "LCD_Swiss_Bank.sqs"
["init",player8,100000] exec "LCD_Swiss_Bank.sqs"

What am I doing wrong now? :-[
« Last Edit: 26 Mar 2003, 17:50:32 by Waterman »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #18 on: 26 Mar 2003, 18:18:15 »
lol

["show money",player5] exec "LCD_Swiss_Bank.sqs"

should b

["show",player5] exec "LCD_Swiss_Bank.sqs"

 :P

read carefully ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Waterman

  • Guest
Re:Money system...
« Reply #19 on: 26 Mar 2003, 18:50:04 »
Right I have no errors now, but it only shows you the money you have for a short time even if you have the trigger activated repeatedly.  It would also be nice to make the option available via the action menu.

Also how do I go about the shop thing?

I know this comes into it:

["add_remove",player5,20000] exec "LCD_Swiss_Bank.sqs"

but how do I make the option in the action menu like: "Buy Ferrari for $80000" appear? then make the car appear at a spot? I only want this option to appear when near a certain building.

I know I being a pain, but you missed out bits... ;) ::)

Sorry,
Waterman. :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #20 on: 26 Mar 2003, 19:56:30 »
lol make da place and in its init write

this addaction ["Buy Ferrari for $80000","scripotname.sqs]

now in da script make

Code: [Select]
_man = _this select 1
["add_remove",_man,80000] exec "LCD_Swiss_Bank.sqs"

and use createvehicle 2 create da car werever u want :P

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

stalin

  • Guest
Re:Money system...
« Reply #21 on: 27 Mar 2003, 17:11:01 »
How would one interact with those money in another script?

For example if I wanted an action not to appear in a shop if I didn't have enough money.

Could I do something like tihs:

? (money <= 1000): goto "end"

or do I have to call the swiss_bank script. If so, how?

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #22 on: 27 Mar 2003, 18:22:56 »
 :o :o :o
i know i forgot somin ;D

ill make somkin p nd put it here tomoz ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

stalin

  • Guest
Re:Money system...
« Reply #23 on: 27 Mar 2003, 19:19:04 »
Thanks. I really like that swiss_bank script..  thinking about using it in a mission if the problem can be solved.  :)

Waterman

  • Guest
Re:Money system...
« Reply #24 on: 27 Mar 2003, 19:48:32 »
Emm... how do I use createvehicle? ::)
To be more precise, how do I get the vehicle to appear when the option in the action menu is selected?

Cheers,
Waterman. :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #25 on: 27 Mar 2003, 21:17:18 »
_name = "vehicletype" createvehicle position

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Waterman

  • Guest
Re:Money system...
« Reply #26 on: 27 Mar 2003, 22:44:30 »
Right. I have almost got this figured out...

Just one last question... ;)

Rather than typing out lots of different scripts, is there something I can use instead of each players name? At the moment, this is what I have got:

Code: [Select]
["show",player8] exec "LCD_Swiss_Bank.sqs"
_man = _this select 1
["add_remove",_man,-80000] exec "LCD_Swiss_Bank.sqs"

vendor sidechat "Thank you for the purchase"
~5
"F360" CreateVehicle getmarkerpos "vendor"
["show",player8] exec "LCD_Swiss_Bank.sqs"
exit

Rather than using "player8" or "player whatever", can I use somethng that will apply for any player? Is it something like "_man" or something or is it just "player".

Cheers,
Waterman. :P

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #27 on: 28 Mar 2003, 04:04:11 »
just use da man ;D

 
_man = _this select 1
["show",_man] exec "LCD_Swiss_Bank.sqs"
["add_remove",_man,-80000] exec "LCD_Swiss_Bank.sqs"

vendor sidechat "Thank you for the purchase"
~5
"F360" CreateVehicle getmarkerpos "vendor"
["show",_man] exec "LCD_Swiss_Bank.sqs"
exit


i think u need 2 put name b4 da createvehicle ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Waterman

  • Guest
Re:Money system...
« Reply #28 on: 28 Mar 2003, 17:09:16 »
O.K. Thanks... hopefully this will be it.

Waterman. :D

P.S. How do you add a check to make sure the player has enough money... ??? ;) ::)
« Last Edit: 28 Mar 2003, 17:24:19 by Waterman »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #29 on: 28 Mar 2003, 20:25:55 »
i said ill make somthin but itll take som time - ill post it tomoz i think :D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta