ok
ok now let's get it started ! i might need to doublepost ! my god !!
first thing ! put the script weaplimitedrifle in your weapon's main slot
example: mas36 coz it's a rifle, you'll only be able to have one or 2 rifles.
:state=0:state=1
:state=1,plrdistwithin=40,plrusingaction=1:state=2
:state=1,plrusingaction=0:state=3
:state=2,vargreater=gunsqty 3,vargreater=gunsqtyrifle 1:state=1
:state=2,varequal=gunsqty 2,varequal=gunsqtyrifle 1:playertake,addvar=gunsqtyrifle 1,gunsqty 1
:state=2,varless=gunsqty 4,varless=gunsqtyrifle 1:playertake,addvar=gunsqtyrifle 1,gunsqty 1
:state=3:state=1
and now, put this one in your pistol's main slot. (weaplimitedpistol)
use any pistol for this one i think you can have 2.
:state=0:state=1
:state=1,plrdistwithin=40,plrusingaction=1:state=2
:state=1,plrusingaction=0:state=3
:state=2,vargreater=gunsqty 3,vargreater=gunsqtypistol 1:state=1
:state=2,varequal=gunsqty 2,varequal=gunsqtypistol 1:playertake,addvar=gunsqtypistol 1,addvar=gunsqty 1
:state=2,varless=gunsqty 4,varless=gunsqtypistol 1:playertake,addvar=gunsqtypistol 1,addvar=gunsqty 1
:state=3:state=1
and this one on your machinegun's main slot
(weaplimitedmachinegun) you can have 2
:state=0:state=1
:state=1,plrdistwithin=40,plrusingaction=1:state=2
:state=1,plrusingaction=0:state=3
:state=2,vargreater=gunsqty 3,vargreater=gunsqtymachinegun 1:state=1
:state=2,varequal=gunsqty 2,varequal=gunsqtymachinegun 1:playertake,addvar=gunsqtymachinegun 1,addvar=gunsqty 1
:state=2,varless=gunsqty 4,varless=gunsqtymachinegun 1:playertake,addvar=gunsqtymachinegun 1,addvar=gunsqty 1
:state=3:state=1
now, put 4 random objects in any random place you want and set those as dynamic, immobile, aways active.
now put this script at the main slot of the first object
(weaplimitvariable)
:state=0:dimvar=gunsqty,state=1
this one in the second
(weaplimitvariablerifle)
:state=0:dimvar=gunsqtyrifle,state=1
and this in the tird...
(weaplimitvariablepistol)
:state=0:dimvar=gunsqtypistol,state=1
and the last one.
(weaplimitvariablemachinegun)
:state=0:dimvar=gunsqtymachinegun,state=1
now you'll soon realize that if we need to erase the player's weapons, he wouldn't be able to take any other else because the var number is already full, but don't you worry, i got a solution.
i present you... the fresh... and new... weapons eraser script !! ohh
just put this baby in a triggerzone, pass through it, and your weapons will be deleted and the variables set to 0, perfect !
observations: all of your weapons need to use these scripts, if you wanna add another gun just tell me, i'll mod the scripts for you, and for last, be aware that if you takethe same weapon twice, you won't be able to take another weapon holding the same script.
now be carefull and pay atention to bugs, coz i just wrote this script at midnight, it took me 40 minutes, and i was almost sleeping, so be carefull.
mods for creating a inteligent game,at least