Dolinho Posted October 9, 2014 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.
justn Posted October 9, 2014 Posted October 9, 2014 You can't use them all at once. Datastore - Store data to a database quickly. (Useful for saving scripted tables)
Dolinho Posted October 9, 2014 Author 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.
Mr_Moose Posted October 9, 2014 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. MTA Community | GitHub | 99Stack Forum
Dolinho Posted October 9, 2014 Author 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
john47109 Posted March 16, 2015 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. nunchaku tricks
JR10 Posted March 16, 2015 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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