OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Serial Killer on 12 Jan 2005, 18:20:12
-
I need script help! If somebody can create scripts like this, e-mail at tomi.koivula@kotinet.com
You have to create few money scripts, like this.. In Init script, player has 200 dollars. When the player buys a weapon, he loses 200 dollars. When the player burglarizes a bank, he wins 500 dollars, something like that..
Please help me! I will do anything.. :'( Thanks in advance!
-
Why don't you ask the makers of the Noville mission if you can use their scripts?
-
Where can I find Noville mission?? Hmm.. Wait a minute! Now I remember where I can find Noville.. It is a MP mission right? If it is, I can find it..
-
Or, why not just make your own script?
Just put in the init.sqs file Cash=200
Then too buy the weapon put in the script
?(Cash <= 200):hint"You dont have enough cash!";exit
hint"You got a glock!"
ap addmagazine "Glockmag"
ap addweapon "glock"
Cash=cash-200
And that would work for buying a weapon.
For the tank just put
?(ap in Tank):cash=cash+500;hint"you got 500 bucks!!"
Really very simple.
-
Cool, I owe you one, buddy! I will send that mission where I need that script, if you want ;) You earn it!!
-
Um, actually I just made that script up,
glad you like it though.
If you have anymore questions just PM me.
-
Well, I have a problem again..
How I can add an Action to player when he's near a man named Man1?? If that man is dead, the trigger has to be deleted.. When the player left's the trigger area, the action must be deleted.
Is it possible that the trigger follows that man named Man1? If the Man1 moves somewhere, the trigger follows him..? Thanks in advance!
Ps: Sorry about my English, it's not a perfect :-\
-
just add the action to man1
when a player gets near him the action will appear
btw, Yes you can make a trigger follow someone:
name the trigger and put it in a setpos loop (a script)
#loop
trigger1 setpos getpos man1
~.1
goto "loop"
-
Oh no, I have a problem again I use a removeAction function, but the action wont be deleted..?
OnActivition: steal = ap addaction ["Steal money","Money.sqs"]
OnDeactivation: ap removeAction steal
Did I do something wrong?
-
Removeaction command seems too be a little faulty.
Instead of having "removeaction steal" try ap Removeaction 0;ap removeaction 1
-
Thanks!