Dolinho Posted October 9, 2014 Share Posted October 9, 2014 How can I use the 45 colt, desert and silenced all at once? All weapons not only that I quoted. sorry for the bad english. If someone answer me will stay here very grateful. Link to comment
justn Posted October 9, 2014 Share Posted October 9, 2014 You can't use them all at once. Link to comment
Dolinho Posted October 9, 2014 Author Share Posted October 9, 2014 But I saw in some server when I played that I could use. I could have colt 45 and desert in the same inventory. Link to comment
Mr_Moose Posted October 9, 2014 Share Posted October 9, 2014 That's the thing then, they used an inventory, probably id based which can store all weapons, even those in the same slot. However you can't do this by yourself using the standard features, unless you make your own inventory system from scratch. Link to comment
Dolinho Posted October 9, 2014 Author Share Posted October 9, 2014 This is quite laborious. Saw this in the MTA wiki. I thought it was What do I want to but I am mistaken. function giveWeapons(player, weaponsString) local weaponsTable = split(weaponsString, ';') --split the string by the semi colon for k,v in ipairs(weaponsTable) do --for all the split values do weaponId = gettok(v, 1, string.byte(',')) --get the weapon ID using gettok, retrieve the first token weaponAmmo = gettok(v, 2, string.byte(',')) --get the ammo using gettok, retrieve the second token if (weaponId ~= nil and weaponAmmo ~= nil) then --if neither of them is invalid giveWeapon(player, weaponId, weaponAmmo) --give the player the weapons end end end Link to comment
john47109 Posted March 16, 2015 Share Posted March 16, 2015 In my own opinion, a player can only use one weapon at a time unless he is already an expert then he might be able to use another one. Link to comment
JR10 Posted March 16, 2015 Share Posted March 16, 2015 This is quite laborious.Saw this in the MTA wiki. I thought it was What do I want to but I am mistaken. This is for saving weapons and loading them again. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now