Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Weapon on the floor [ solved ]  (Read 1996 times)

0 Members and 1 Guest are viewing this topic.

Offline UH60MG

  • Members
  • *
Weapon on the floor [ solved ]
« on: 19 Jun 2008, 05:04:38 »
I want an Ak74 to appear on the ground that can be picked up by the player. Is it possible in ArmA and if so how do I it?
« Last Edit: 20 Jun 2008, 04:08:09 by UH60MG »

Offline Trexian

  • Members
  • *
Re: Weapon on the floor
« Reply #1 on: 19 Jun 2008, 05:21:07 »
Do you know where you want it, as in coordinates on the map?  Or just at a place in front of the player at a certain time?
Sic semper tyrannosauro.

Offline UH60MG

  • Members
  • *
Re: Weapon on the floor
« Reply #2 on: 19 Jun 2008, 05:26:29 »
Yes, fixed coordinates.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Weapon on the floor
« Reply #3 on: 19 Jun 2008, 05:49:16 »
The following code will place an AK and one magazine in front of the player:

Code: [Select]
_type = "WeaponHolder"
_gun = "AK74"
_ammo = "30Rnd_545x39_AK"
_weapon2 = _type createVehicle [0,0,0]
_weapon2 addweaponCargo [_gun,1]
_weapon2 addmagazinecargo [_ammo,1 ]
_weapon2 setpos (player modelToWorld [0,1,0]);

Simply replace the "(player modelToWorld [0,1,0])" in the setpos line with your exact coordinates.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...