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's name  (Read 1088 times)

0 Members and 1 Guest are viewing this topic.

voodzia

  • Guest
weapon's name
« on: 21 May 2005, 18:20:03 »
I wanted to play around with command selectWeapon since I found it that it could be pretty useful in my mission. But I have a problem with its second operand - weapon. How am I to know what weapons e.g Mi24 is equipped with? I tried to use commands primaryWeapon or secondaryWeapon but this ain't working. A short sample of
Code: [Select]
; hind - name of my Mi24 helicopter

hint format["%1\n%2", primaryWeapon hind, secondaryWeapon hind]
Can someone tell me what wrong is with that?
Thank you in advance for help.

Offline 456820

  • Contributing Member
  • **
Re:weapon's name
« Reply #1 on: 21 May 2005, 18:22:53 »
HellfireLauncherHind
Rocket57x64
MachineGun30

There all the MI24's weapons so try something like
Code: [Select]
Hind selectweapon WEAPON_NAME

voodzia

  • Guest
Re:weapon's name
« Reply #2 on: 21 May 2005, 18:30:50 »
How do you know that these are the right names? And what about some other hinds - made by addon makers? I mean there must be some way to get these names via script commands. Show me the way - but don't walk it with me ;) And one more thing - why this simple command ain't working?
« Last Edit: 21 May 2005, 18:32:15 by voodzia »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:weapon's name
« Reply #3 on: 21 May 2005, 18:32:47 »
weapons vehicle

Operand types:
vehicle: Object
Type of returned value:
Array
Description:
Returns array of names of all vehicle's weapons..

Example:
weapons player
Plenty of reviewed ArmA missions for you to play

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:weapon's name
« Reply #4 on: 21 May 2005, 18:33:47 »
The weapon names are just the class names from the games config.

So, if you wanted the class names from 3rd party addons you would need to look in its config.cpp if they weren't listed in the readme.

btw....those names must be enclosed in quotes.

"HellfireLauncherHind"
"Rocket57x64"
"MachineGun30E"


Planck
« Last Edit: 21 May 2005, 18:35:23 by Planck »
I know a little about a lot, and a lot about a little.

voodzia

  • Guest
Re:weapon's name
« Reply #5 on: 21 May 2005, 18:35:09 »
Thank you macguba - that's exactly what I was looking for.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:weapon's name
« Reply #6 on: 21 May 2005, 18:36:38 »
Does that always work Macguba?

Planck
I know a little about a lot, and a lot about a little.

Offline 456820

  • Contributing Member
  • **
Re:weapon's name
« Reply #7 on: 21 May 2005, 18:44:33 »
Quote
How do you know that these are the right names
look in the editors depot theres a list with every single weapon and magazine name in it thats where i got it from

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:weapon's name
« Reply #8 on: 21 May 2005, 19:30:17 »
Quote
Does that always work Macguba?
Don't see why  not.  I used it on a bunch of vehicles the other day when I was making my tank smoke script and wanted to know what machine gun everybody had.  
Plenty of reviewed ArmA missions for you to play

voodzia

  • Guest
Re:weapon's name
« Reply #9 on: 21 May 2005, 20:00:24 »
I just would like to add that weapons command works not only with vehicles - it works also with soldiers - I've just tested it in my mission. And btw, commands primaryWeapon and secondaryWeapon work fine with soldiers but ain't working with vehicles. Actually I don't know why but that's the way it is.