Home   Help Search Login Register  

Author Topic: Ammo Crates  (Read 1439 times)

0 Members and 1 Guest are viewing this topic.

Capman

  • Guest
Ammo Crates
« on: 04 May 2004, 22:35:14 »
I'm making a little deathmatch mission and I can't figure out how to put guns and ammo in the ammo crate.

Basically I want lots of ammo, plenty of rocket launchers, machine guns, and sniper rifles.

Thanks for the help.

Offline oyman

  • Members
  • *
  • king of pings
Re:Ammo Crates
« Reply #1 on: 04 May 2004, 23:55:50 »
you mean something like this
Code: [Select]
; ***********************************************************************
; **** Custom crate script for Operation Flashpoint
; **** Generated by Chris's OFP Script Editor
; **** Crate Builder Wizard 2.0
; ****
; **** ORIGINAL FILE NAME: CUSTOM_CRATE.sqs
; **** INSTRUCTIONS: Run script from the INITIALIZATION box of the crate
; **** RUN CODE: [this] Exec "CUSTOM_CRATE.sqs"
; ***********************************************************************

; Get the crate parameter given
_crate = _this Select 0

; Remove the stock items from the crate
ClearMagazineCargo _crate
ClearWeaponCargo _crate

; Add the items to the crate
_crate AddWeaponCargo ["AT4Launcher", 50]
_crate AddMagazineCargo ["AT4Launcher", 250]
_crate AddWeaponCargo ["CarlGustavLauncher", 50]
_crate AddMagazineCargo ["CarlGustavLauncher", 250]
_crate AddWeaponCargo ["HuntingRifle", 50]
_crate AddMagazineCargo ["HuntingRifleMag", 250]
_crate AddWeaponCargo ["LAWLauncher", 50]
_crate AddMagazineCargo ["LAWLauncher", 250]
_crate AddWeaponCargo ["M21", 50]
_crate AddMagazineCargo ["M21", 250]
_crate AddWeaponCargo ["M60", 50]
_crate AddMagazineCargo ["M60", 250]
_crate AddWeaponCargo ["PK", 50]
_crate AddMagazineCargo ["PK", 250]
_crate AddWeaponCargo ["RPGLauncher", 50]
_crate AddMagazineCargo ["RPGLauncher", 250]
_crate AddWeaponCargo ["SVDDragunov", 50]
_crate AddMagazineCargo ["SVDDragunov", 250]

Exit
just copy and paste this and save it as a .sqs file,or if you are too lazy to do so just get the attachment.to run this just put this into the Init line of the ammo box [this] Exec "CUSTOM_CRATE.sqs"/I also recommend you get this program here http://ofpec.com/editors/resource_view.php?id=377
« Last Edit: 04 May 2004, 23:58:51 by oyman »

Capman

  • Guest
Re:Ammo Crates
« Reply #2 on: 05 May 2004, 00:50:09 »
Thanks, that's awesome.

Do I save the .sqs in the missions folder?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Ammo Crates
« Reply #3 on: 05 May 2004, 02:49:35 »
Yes, save the sqm in the mission folder.

Offline oyman

  • Members
  • *
  • king of pings
Re:Ammo Crates
« Reply #4 on: 05 May 2004, 03:49:40 »
Quote
Yes, save the sqm in the mission folder.
dont you mean sqs file :P

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Ammo Crates
« Reply #5 on: 05 May 2004, 18:45:44 »
Yes, sqs (My fingers type ahead of my brain sometimes)
« Last Edit: 05 May 2004, 18:46:23 by Raptorsaurus »

Offline ZNorQ

  • Members
  • *
  • ehr... uhm... duh...
Re:Ammo Crates
« Reply #6 on: 25 May 2004, 16:30:20 »
@oyman;

That is fine, I've done that, but my problem is that when I place some ammo in a crate - lets say for the sake of simplicity...;

  _myCrate addMagazineCargo["Mine", 5]

What happens in my mulitiplayer maps is that EVERYBODY (atleast 2 players - since that is what I've been testing with) can pick up 5 mines EACH.... AAARRRRGHH...   >:(

Any ideas?

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Ammo Crates
« Reply #7 on: 26 May 2004, 12:01:27 »
hmmm, never experienced that before.  In ANY multiplayer map you make, I would suggest you add a gamelogic named  server  it will solve many problems, perhaps even the one you are experiencing