I'm working on a script that allows players to upgrade their guns (eg. AK74 to AKS_74_kobra,) when they have the required items in their inventory. For eg. I want an AK74 to be able to upgrade for 2 scrap metal into a AKS_74_kobra, how do I do this?
Something like this?
private [_mags];
_mags = ["Scrap_Metal","Scrap_Metal"]; // Don't mind the classname, only as an example :D
if !(player hasWeapon "AK74") exitWith {
cutText [format["U don't have an AK74!"], "PLAIN DOWN"];
};
if !(player has in _mags) exitWith {
cutText [format["U don't have the required items to upgrade: 2x scrap metal"], "PLAIN DOWN"];
};
if (player has in _mags) then {
player removeweapon "AK74";
sleep 1;
player addweapon "AKS_74_kobra";
cutText [format["Ur AK74 has been updated to an AKS_74_kobra!"], "PLAIN DOWN"];
};
Question
Darihon
Hello,
I'm working on a script that allows players to upgrade their guns (eg. AK74 to AKS_74_kobra,) when they have the required items in their inventory. For eg. I want an AK74 to be able to upgrade for 2 scrap metal into a AKS_74_kobra, how do I do this?
Something like this?
Thanks in advance,
Darryl
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now