Jump to content
Sign in to follow this  
justas1989

how to increase capacity

Recommended Posts

Hi. I was just wondering was it possible to increase the ammount of ammo the person can carry? And if yes then how?

Share this post


Link to post
Share on other sites

hi,

Hi. I was just wondering was it possible to increase the ammount of ammo the person can carry? And if yes then how?

If you want a solution without addons I suggest you to try Multiple Weapon Holder by Blip on ofpec. Not sure but I think it is only SP compatable. I you want I can modify the script to make it MP compatable.

Description: Allows a player or AI to carry multiple rifles and more ammo.

The trick is to create a weapon holder (little bags for the weapon in ofp) and to make it follow the player underground to simulate a backpack.

Or there's another solution: Use the very nice transbox script by my friend Mad Max. Moreover this solution is SP/MP compatable.

Description: Allows vehicles to pickup ammo boxes to unload them at anyother place where ammo is needed. This way you dont need to fill up the vehicles with weapons.

cya.

Nikiller.

Edited by Nikiller
added transbox solution

Share this post


Link to post
Share on other sites
Multiple Weapon Holder by Blip on ofpec. Not sure but I think it is only SP compatable.

u right, not works in MP

Share this post


Link to post
Share on other sites

The simplest : You can use a radio trigger for unlimited weapons and unlimited ammo and switch weapons at will.

Just use a frequency (Alpha) to a command removeallweapons + addweapon + addmagazine and another frequency (Beta) to do the same with another weapon and so on...

Share this post


Link to post
Share on other sites

hi,

u right, not works in MP

Hey Inc,

Not anymore :D I rewrote the script to make it MP compatable and I cleaned the code to have better performance.

Here's the first version. It is more performance hungry but when you getin/getout a vehicle the holder addAction appears faster. It is SP/MP compatable but I recommand it for SP.

back_packv1.sqs

;******************************************************************************************
;Multiple Rifle Script Originaly Made By BLIP
;All credits go to the autor(s)
;Modified by Nikiller for MP compatability and code cleaning v0.9b
;NOTE: place a game logic named server somewhere on your map
;NOTE2: it takes 30 sec for the holder addAction to appear at the mission start
;NOTE3: In MP holder addAction will appear for all players
;NOTE4: If you get in a vehicle it can take some times for the addAction to appear again
;[unitName,ammoType,numberOfAmmo,weaponType,numberOfWeapon] exec "scriptname.sqs"
;example: [guy1,"SteyrMag",3,"Steyr",1] exec "scriptname.sqs"
;WARNING: Don't put too much weapons in the holder or it could create an ammo bug (ofp bug)
;******************************************************************************************

_u = _this select 0
_ammotype = _this select 1
_ammonum = _this select 2
_weapontype = _this select 3
_weaponnum = _this select 4

_pu=getPos _u
_px=_pu select 0
_py=_pu select 1
_pz=_pu select 2
_pz=_pz-0.5

_s=local server
_d=0.5

? _s: _holder="weaponHolder" createVehicle [0,0,0]
~2
if (_s) then {_holder setPos [_px,_py,_pz]}

@ !(isNull _holder)

_holder addMagazineCargo [_ammotype,_ammonum]
_holder addWeaponCargo [_weapontype,_weaponnum]

if (_s) then {} else {goto "ende"}

#loop
~_d
if (alive _u) then {} else {goto "ende"}
_pu=getPos _u
_px=_pu select 0
_py=_pu select 1
_pz=_pu select 2
_pz=_pz-0.5
_holder setPos [_px,_py,_pz]
if (vehicle _u==_u) then {goto "loop"}

#loop2
~_d
if (alive _u) then {} else {goto "ende"}
_pu=getPos _u
_px=_pu select 0
_py=_pu select 1
_pz=_pu select 2
_pz=_pz+500
_holder setPos [_px,_py,_pz]
if (vehicle _u==_u) then {goto "loop"} else {goto "loop2"}

#ende

exit

Here's the second version more suited for MP (better performance) but when you getin/getout a vehicle the holder addAction appear slower (sometimes 30 sec after you get out)

back_packv2.sqs

;******************************************************************************************
;Multiple Rifle Script Originaly Made By BLIP
;All credits go to the autor(s)
;Modified by Nikiller for MP compatability and code cleaning v0.9b
;NOTE: place a game logic named server somewhere on your map
;NOTE2: it takes 30 sec for the holder addAction to appear at the mission start
;NOTE3: In MP holder addAction will appear for all players
;NOTE4: If you get in a vehicle it can take some times for the addAction to appear again
;[unitName,ammoType,numberOfAmmo,weaponType,numberOfWeapon] exec "scriptname.sqs"
;example: [guy1,"SteyrMag",3,"Steyr",1] exec "scriptname.sqs"
;WARNING: Don't put too much weapons in the holder or it could create an ammo bug (ofp bug)
;******************************************************************************************

_u = _this select 0
_ammotype = _this select 1
_ammonum = _this select 2
_weapontype = _this select 3
_weaponnum = _this select 4

_pu=getPos _u
_px=_pu select 0
_py=_pu select 1
_pz=_pu select 2
_pz=_pz-0.5

_s=local server
_d=0.5

? _s: _holder="weaponHolder" createVehicle [0,0,0]
~2
if (_s) then {_holder setPos [_px,_py,_pz]}

@ !(isNull _holder)

_holder addMagazineCargo [_ammotype,_ammonum]
_holder addWeaponCargo [_weapontype,_weaponnum]

if (_s) then {} else {goto "ende"}

#loop
~_d
if (alive _u) then {} else {goto "ende"}
_pu=getPos _u
_px=_pu select 0
_py=_pu select 1
_pz=_pu select 2
_pz=_pz-0.5
_holder setPos [_px,_py,_pz]
if (vehicle _u==_u) then {goto "loop"}

#in
~_d
if (vehicle _u==_u) then {goto "loop"}
_holder setPos [0,0,0]

#loop2
~_d
if (alive _u) then {} else {goto "ende"}
if (vehicle _u==_u) then {goto "loop"} else {goto "loop2"}

#ende

exit

Here's a demo to show how it works.

DEMO LINK

cya.

Nikiller.

Edited by Nikiller
added demo link

Share this post


Link to post
Share on other sites

cool niki ill try it!

i got more free times from september.

thanks.

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  

×