Home   Help Search Login Register  

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

0 Members and 1 Guest are viewing this topic.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #30 on: 29 Mar 2003, 20:22:20 »
i did it ;D

u need in da init.sqs


LCD_Check_Money= preprocessfile "LCD_Swiss_Bank_Check_Money.sqf"

now 2 check if da man have da moneydo it like dat (may cuse prob in trigs  :-X)

[unitname,amount(inNums)] call LCD_Check_Money

wil return true if he have da money and false if not  ;D 4 example in watermans script (edited 2 use da function)

Code: [Select]
_man = _this select 1
["show",_man] exec "LCD_Swiss_Bank.sqs"
if (not ([player,80000] call LCD_Check_Money)) then {hint "Dont try cheating LCD, He will send alot of armed people to shot you";exit}
["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

just change da hint ;) ;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 #31 on: 29 Mar 2003, 23:27:16 »
LOL! You mad LCD...

"if (not ([player,80000] call LCD_Check_Money)) then {hint "Dont try cheating LCD, He will send alot of armed people to shot you";exit}"

You been on the drugs again... ;) ;D
Waterman. ;D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #32 on: 30 Mar 2003, 00:42:46 »
me ? on drugs ?  :o no way

* smokes noder 1

 ::) ::) ::) ::) ::)

it works ?

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

Waterman

  • Guest
Re:Money system...
« Reply #33 on: 30 Mar 2003, 16:39:34 »
It appears to be working... :D

Can I ask you an off topic question... oh well, Im asking anyway... ::)

I have managed to set up a script based on the one you gave me earlier to rob a bank... this is what I have got so far:

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

_mancash = _mancash - 8000
hintc "The bank has been robbed"
~5
["show",_man] exec "LCD_Swiss_Bank.sqs"
exit

Now how do I make the alarm noise go off for about half a minute, and de-activate the option to rob the bank during that time.  To activate the option I have put this in the init if it helps...
Code: [Select]
this addaction ["Rob the Bank","Robbank1.sqs"]
In other words a plyer could keep robbing the bank really quickly, rather than the option dissapearing for a while so they cannot cheat. :P Probably don't understand what Im meaning but nevermind... ::)

Cheers,
Waterman.

stalin

  • Guest
Re:Money system...
« Reply #34 on: 31 Mar 2003, 01:01:59 »
Great scrips LCD! Best money system I've found..

I'm going to use them in my mission if you don't mind..?
I'll give you credits  ;)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #35 on: 31 Mar 2003, 01:08:32 »
@ stalin

u dont have 2 gimme credits ;D

just go nd test ma misions :P (check da sig line and da beta testing thread ;D)- but u can gimme credits if u realy want 2 ;D  ;)

@ waterman

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

_mancash = _mancash - 8000
hintc "The bank has been robbed"
(_this select 0) removeaction (_this select 2)
~5
["show",_man] exec "LCD_Swiss_Bank.sqs"
~25 <----------------------- change da time
(_this select 0) addaction ["Rob the Bank","Robbank1.sqs"]
exit

check da code - should do wat u want ;D

LCD OUT


« Last Edit: 03 Apr 2003, 19:18:30 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Waterman

  • Guest
Re:Money system...
« Reply #36 on: 03 Apr 2003, 18:35:16 »
Emm... It does take away the action but it doesn't put it back after x (25) time. :P
Maybe it's because it doesn't know which building to apply the addaction command to...? ???

Waterman. :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #37 on: 03 Apr 2003, 19:19:07 »
oops ;D

lol - i modified da script nd it should work now ;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 #38 on: 05 Apr 2003, 14:01:02 »
That's great. All seems to be working well! :D
But I just remembered... ::) That script still allows the cops to rob the bank say... :P How do you make it that the script only works for certain players?

I take it you use a check code say, and if player1, player2 and player3 (who are cops), go to the bank, it wont work for them so that they cannot rob bank. You understand me?

Cheers,
Waterman. ::) :o ;D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #39 on: 05 Apr 2003, 19:17:52 »
da probw/ actions is dat every1 can use em 1ce dey r added 2 somin  :-\

but i can make it so no1 can rob da bank wen dere r comps in it  ;D

just use trig 2 check if 1 of da cops r in nd remove da action or  u can do somin like dat (wil make da action stay but wont allow em 2 rob da bank)

Code: [Select]
_man = _this select 1
? (_man =  player1) or (_man = player2) or (_man = player3) : hint "wat kind of cop r u ? u cant rob da bank - deyll know u"; exit
["show",_man] exec "LCD_Swiss_Bank.sqs"
["add_remove",_man,20000] exec "LCD_Swiss_Bank.sqs"

_mancash = _mancash - 8000
hintc "The bank has been robbed"
(_this select 0) removeaction (_this select 2)
~5
["show",_man] exec "LCD_Swiss_Bank.sqs"
~25 <----------------------- change da time
(_this select 0) addaction ["Rob the Bank","Robbank1.sqs"]
exit

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

Loc-Dog

  • Guest
Re:Money system...
« Reply #40 on: 05 Apr 2003, 19:27:41 »
Remember to post this mission on this topic when you have a beta version of it so we can try it, I can't wait to robb those suckers blind!!

Waterman

  • Guest
Re:Money system...
« Reply #41 on: 05 Apr 2003, 19:41:28 »
Right, I think I know what to do...

So you can do this or something simular?:

Code: [Select]
_man = _this select 1
["show",_man] exec "LCD_Swiss_Bank.sqs"
? (_man = player1) or (_man = player2) or (_man = player3) or (_man = player4) : (_this select 0) removeaction (_this select 2); exit
["add_remove",_man,20000] exec "LCD_Swiss_Bank.sqs"

_mancash = _mancash - 8000
hintc "The bank has been robbed"
playsound "alarm"
(_this select 0) removeaction (_this select 2)
~5
["show",_man] exec "LCD_Swiss_Bank.sqs"
~25
(_this select 0) addaction ["Rob the Bank","Robbank1.sqs"]

I'll try a few things out and hopefully get what Im after...

Cheers,
Waterman. :)

P.S. When I have a beta map ready I'll tell you... ;)
« Last Edit: 05 Apr 2003, 19:50:42 by Waterman »

Offline zip

  • Members
  • *
  • Zip mission maker of WW2ec team
Re:Money system...
« Reply #42 on: 12 Apr 2003, 12:17:30 »
can you guys please post the FULL buy script ?!!!
"words wich isnt is bringed to action, isnt worth saying.."

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
Re:Money system...
« Reply #43 on: 12 Apr 2003, 14:25:19 »
And i nice little example mission  ;D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Money system...
« Reply #44 on: 12 Apr 2003, 15:15:28 »
dere is no full buy script :P

dere is my SWIS_BANK script nd it can b put in meny difrent situations - read nd c :P

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