Home   Help Search Login Register  

Author Topic: Make a loaded gun appear just on the ground?  (Read 712 times)

0 Members and 1 Guest are viewing this topic.

Mike

  • Guest
Make a loaded gun appear just on the ground?
« on: 13 Nov 2002, 00:24:30 »
Hi the topic pretty much explains it all. I want to make it just on the ground.. as if I didnt add it to an actual object.. but preferably loaded..


and :cheers: to 1000 topics
« Last Edit: 13 Nov 2002, 00:29:01 by Mike »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Make a loaded gun appear just on the ground?
« Reply #1 on: 13 Nov 2002, 01:48:37 »
Provided you have Resistance this is definately possible.

BIS added a couple of objects, one called "WeaponHolder" and one called "SecondaryWeaponHolder". It's these that make dropping weapons on the ground possible. So now you can use a bit of code like this:

wh1 = "WeaponHolder" createvehicle (getpos pos)
wh1 addmagazinecargo ["m16",1]; wh1 addweaponcargo ["m16",1]

To get yourself a loaded M16 lying on the ground at pos.

The "SecondaryWeaponHolder" is for adding things like LAW Launchers etc (Secondary Weapons funnily enough ;)). You can still add them to a "weaponHolder", but they stick straight up out of the ground for some reason ;D

Anyway, try that and see if it suits your purposes...

Mike

  • Guest
Re:Make a loaded gun appear just on the ground?
« Reply #2 on: 13 Nov 2002, 01:52:46 »
 ;D thanks ya berry much.. I wanted the player to be able to purchase weapons.. now that I can create em it should work  ;D

 :cheers:
« Last Edit: 13 Nov 2002, 01:53:55 by Mike »