View Full Version : what weapon in hand
I need to check what weapons a unit is goind to shoot or has in hand, is there any existing command ?
thanks for your help.
Maybe this is helpful
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0
_handguns = ["MakarovSD"]
_c = count _handguns
_i = 0
_gun = _handguns select _i
?_unit hasweapon _gun : goto "yes"
_i = _i + 1
?_i <_c : goto "start"
hint format ["ALERT: The Civilian carries a %1 Kill him",_gun]
I'll test it
shit I posted a wrong section.
the script is only checking if the weapon is in the inventory and not if the unit has it in hand.
checking animation did the job.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.