Jump to content
Sign in to follow this  
AgentJonathan

Weapons on table part 2

Recommended Posts

I need help with the weapons on tables thing, it did work, but there are always two weapons on table. I was wondering how I could make it just one. HERE'S MY SCRIPT|

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

~0.1

_table = _this select 0

_gun = _this select 1

_ammo = _this select 2

_height = _this select 3

_vertical = _this select 4

_type = "weaponholder"

?_vertical:_type = "secondaryweaponholder"

_kb_testman = "SoldierWB" camcreate [0,0,0]

removeallweapons _kb_testman

_kb_testman addweapon _gun

?(secondaryweapon _kb_testman)==_gun:_type = "secondaryweaponholder"

?((secondaryweapon _kb_testman)==_gun)&&_vertical:_type = "weaponholder"

deletevehicle _kb_testman

_weapon2 = _type createVehicle [0,0,0]

_weapon2 addmagazinecargo [_ammo,10 ]

_weapon2 addweaponCargo [_gun,1]

_weapon = _type createVehicle [0,0,0]

_weapon addmagazinecargo [_ammo,10 ]

_weapon addweaponCargo [_gun,1]

_weapon setpos getpos _table

_weapon setdir (getdir _table)

_weapon2 setpos getpos _table

_weapon2 setdir (getdir _table)

_table setdir (getdir _table) + 1

_weapon setpos [(getPos _table select 0) + 0.2 * sin (getdir _table),(getPos _table select 1) + 0.2 * cos (getdir _table),(_height)]

_weapon2 setpos [(getPos _table select 0) - 0.2 * sin (getdir _table),(getPos _table select 1) - 0.2 * cos (getdir _table),(_height)]

_table setdir (getdir _table) - 1

player reveal _weapon

player reveal _weapon2

exit

Share this post


Link to post
Share on other sites

biggrin_o.gif

AgentJonathan,

If you don't want 2 weapons on the table, remove all the lines that begin with _weapon2

goodnight.gif

Share this post


Link to post
Share on other sites

Oh Shniykee!  banghead.gif  Never noticed, even tough i studied this thing a half billion times.  wink_o.gif  Haw!  rofl.gif  Sorry, shoulda known. Course I am new at this, but it was very obvious.  whistle.gif

wow_o.gif  icon_rolleyes.gif  notworthy.gif

Share this post


Link to post
Share on other sites

Eh verry sorry. sad_o.gif I was always an enemy of copyright, and I did not mean it. Num 2, I do so understand the functions of the script. tounge2.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×