AgentJonathan 0 Posted February 18, 2007 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
ProfTournesol 956 Posted February 19, 2007 Are you kidding ? It's so obvious that you must be kidding... Share this post Link to post Share on other sites
SevenBEF 0 Posted February 19, 2007 AgentJonathan, If you don't want 2 weapons on the table, remove all the lines that begin with _weapon2 Share this post Link to post Share on other sites
AgentJonathan 0 Posted February 19, 2007 Oh Shniykee! Â Â Never noticed, even tough i studied this thing a half billion times. Â Â Haw! Â Â Sorry, shoulda known. Course I am new at this, but it was very obvious. Â Â Â Share this post Link to post Share on other sites
AgentJonathan 0 Posted February 21, 2007 Yeah, it worked. Heh, i gess i shoulda known... Share this post Link to post Share on other sites
kronzky 5 Posted February 24, 2007 AgentJonathan, I you are copying other people's scripts without even understanding them (like in this case, Killerbob's "Guns on Tables and Ground" from OFPEC), you should at least leave their credit in the header, and not call it "MY SCRIPT", as you did... Share this post Link to post Share on other sites
AgentJonathan 0 Posted February 25, 2007 Eh verry sorry. I was always an enemy of copyright, and I did not mean it. Num 2, I do so understand the functions of the script. Share this post Link to post Share on other sites