Jump to content
Sign in to follow this  
ios

addWeaponCargo & Magazine On Server

Recommended Posts

I am making a mission with a money system, all works very well, but i have a problem with Weapon & Magazine, here Scripts i use :

For Weapon Exemple (Reserve is the name of the ammobox, Server is the name of a Game Logic) :

///=Addaction=//
Vendor addAction ["Buy G36a For 300$","Weapon\G36a.sqf"];

///=Weapon\G36a.sqf=//
if (Dollars >= 300) then {
Dollars = Dollars -300;
Server execVM "Weapon\x_G36aOK.sqf";
PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "G36A ADD TO RESERVE"
}
else {PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "NO MONEY ENOUGH"};

///=Weapon\x_G36aOK.sqf=///
Reserve addWeaponCargo ["G36a", 1];

Weapon appear in Ammo Box but i can't get the weapon, same for Ammo.

i use the same way for Ammo (it doesn't work) and the same way for vehicle (it's work).

Thanks In Advance.

Edited by Ios

Share this post


Link to post
Share on other sites

That's was a good idea ! but it seem's this command only work under Arma II OA and my mission is running under Arma II

---------- Post added at 11:07 PM ---------- Previous post was at 09:15 PM ----------

I find the Solution !

Hold Script :

///=Addaction=//
Vendor addAction ["Buy G36a For 300$","Weapon\G36a.sqf"];

///=Weapon\G36a.sqf=//
if (Dollars >= 300) then {
Dollars = Dollars -300;
Server execVM "Weapon\x_G36aOK.sqf";
PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "G36A ADD TO RESERVE"
}
else {PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "NO MONEY ENOUGH"};

///=Weapon\x_G36aOK.sqf=///
Reserve addWeaponCargo ["G36a", 1];  

New Script :

///=Addaction=//
Vendor addAction ["Buy G36a For 300$","Weapon\G36a.sqf"];

///=Weapon\G36a.sqf=//
if (Dollars >= 300) then {
Dollars = Dollars -300;
[nil,Reserve,rEXECVM,"Armes\x_G36aOK.sqf"] call RE;
PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "G36A ADD TO RESERVE"
}
else {PAPABEAR = [resistance,"HQ"]; 
PAPABEAR SideChat "NO MONEY ENOUGH"};

///=Weapon\x_G36aOK.sqf=///
Reserve addWeaponCargo ["G36a", 1];

I use MultiPlayer Framework to make Script run on Machine where "Reserve" is Local, sorry tu bump this thread it's just for ppl who will look for it later :)

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  

×