Home   Help Search Login Register  

Author Topic: Gunsontables weird..  (Read 626 times)

0 Members and 1 Guest are viewing this topic.

Manz

  • Guest
Gunsontables weird..
« on: 17 Aug 2005, 09:59:49 »
iÂ've used the gunsontables script for a while and i wonder if itÂ's possible to make the script.. with one weapon on the table and not TWO..  :D

Offline Blanco

  • Former Staff
  • ****
Re:Gunsontables weird..
« Reply #1 on: 17 Aug 2005, 12:16:26 »
It would be easier for us when you put a link to that script...

Anyway, I know what you talkin' about...

http://www.ofpec.com/editors/resource_view.php?id=782


Modify Killerbob's script into this and run it in the same way you did before.
[name of the table, guntype, ammotype, height of the table, vertical or horizontal (true or false)] exec "table.sqs"

Example : [mytable,"m16","m16",0.955] exec "table.sqs"
Code: [Select]
;Gun Table Script By Killerbob [GST]   (for one weapon only)                          

~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


_weapon = _type createVehicle [0,0,0]
_weapon addmagazinecargo [_ammo,10 ]
_weapon addweaponCargo [_gun,1]
_weapon setpos getpos _table
_weapon setdir (getdir _table)

_table setdir (getdir _table) + 1
_weapon setpos [(getPos _table select 0) + 0.1 * sin (getdir _table),(getPos _table select 1) + 0.1 * cos (getdir _table),(_height)]
player reveal _weapon

exit
« Last Edit: 17 Aug 2005, 13:55:32 by Blanco »
Search or search or search before you ask.