Home   Help Search Login Register  

Author Topic: this addeventhandler ["fired",{hint format ["Name of shot is: %1,%2", (_this  (Read 1057 times)

0 Members and 1 Guest are viewing this topic.

kymandro

  • Guest
this addeventhandler ["fired",{hint format ["Name of shot is: %1,%2", (_this select 2),(_this select 4)]}]

that lets you find out what the weapon is called. dose any one know how to find out waht the magazine is called?
i have addons that arnt offical and i can find what the magazines are called

dake :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
In many cases the magazines are named the same as the weapon, but with 'mag' tagged on the end.

For example: M16mag or ak74mag.


Planck
« Last Edit: 07 Nov 2004, 00:37:56 by Planck »
I know a little about a lot, and a lot about a little.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
It's usually in the readme file. If not, you can use the ammo command.

ammo loon1

would return an array. So

hint format ["%1", ammo loon1]

will give you the answers.

:beat: *Gets Shot* :beat:

Offline Blanco

  • Former Staff
  • ****
hmmm...

I think that ammo counts the total number of bullets available from a given magazinetype.

like in

Code: [Select]
?(player ammo "M60" == 0) : hint "I'm out of ammo"  
Ammo doesn't return the ammotype,I think you'll need the magazines command for that...

Code: [Select]
hint format ["%1",magazines player]
Search or search or search before you ask.

bored_onion

  • Guest
if you know the weapon then surely you can use the weapons and ammo list to find out the associated ammo? in most cases its the same anyway unless its a flare, grenade or rocket.

EDIT: I am a dumbass - I will read the post properly next time!
Quote
i have addons that arnt offical and i can find what the magazines are called
« Last Edit: 07 Nov 2004, 08:38:43 by bored_onion »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
@ Blanco : Whatever. I meant that. I promise! I cannot be wrong! It's against my nature! ;D

@ bored_onion : Should be in the readme file of the addon tho.

:beat: *Gets Shot* :beat: