Home   Help Search Login Register  

Author Topic: need a qury to see if a player has a handgun  (Read 604 times)

0 Members and 1 Guest are viewing this topic.

CopyrightPhilly

  • Guest
need a qury to see if a player has a handgun
« on: 14 Apr 2004, 19:21:59 »
ok i need a quary that will see if the player aready has a hanggun and if he has then to drop it or remove it...

any ideas?

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:need a qury to see if a player has a handgun
« Reply #1 on: 14 Apr 2004, 19:53:25 »
You can try this:

; = = = = = == =
_weaps = weapons player
_weaps = (_weaps - [(PrimaryWeapon player),(SecondaryWeapon player)])

? count _weaps > 0 : player RemoveWeapon (_weaps select 0)
; = = = = = = = =

Though I'm not sure it's gonna work. This script also doesn't check magazines of the handgun. My brain is very slow now...
« Last Edit: 14 Apr 2004, 19:55:09 by Jezuro »
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

CopyrightPhilly

  • Guest
Re:need a qury to see if a player has a handgun
« Reply #2 on: 14 Apr 2004, 20:52:32 »
Thanks A Lot M8, Works 100%

and if anyone wants the script to check the mags then here it is...

=================================================

_mags = magazines player
_mags = (_weaps - [(PrimaryWeapon player),(SecondaryWeapon player)])

? count _mags > 0 : player Removemagazine (_weaps select 0)

=================================================

cheers, Philly

m21man

  • Guest
Re:need a qury to see if a player has a handgun
« Reply #3 on: 14 Apr 2004, 20:53:00 »
Code: [Select]
_gun  = secondaryweapon player
?(_gun == ""): exit
player removeweapon _gun
exit

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:need a qury to see if a player has a handgun
« Reply #4 on: 15 Apr 2004, 19:26:30 »
Thanks A Lot M8, Works 100%

and if anyone wants the script to check the mags then here it is...

=================================================

_mags = magazines player
_mags = (_weaps - [(PrimaryWeapon player),(SecondaryWeapon player)])

? count _mags > 0 : player Removemagazine (_weaps select 0)

=================================================

cheers, Philly

I'm not M8, man  ;)

But I'm also not sure with you mags removing script. It works only for magazines with same name as a weapon...
« Last Edit: 15 Apr 2004, 19:28:12 by Jezuro »
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:need a qury to see if a player has a handgun
« Reply #5 on: 15 Apr 2004, 19:27:47 »
Code: [Select]
_gun  = secondaryweapon player
?(_gun == ""): exit
player removeweapon _gun
exit

And what about rocket launchers?
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"