Jump to content

I NEED SAVE WEAPON CODE


Asi.Eren

Recommended Posts

Posted

You can get easily when I release my mta account classes.

http://www.sincitygaming.net - The next generation of gaming!

SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003

SinCity Gaming | Roleplay Gaming - Beta soon!

SinCity Gaming | Zombie Mode + - 188.165.199.162:22005

Instead of using ip: 188.165.199.162 you can use: sincitygaming.net

Posted

https://wiki.multitheftauto.com/wiki/SetAccountData

x, y, z = getElementPosition(player)
setAccountData ( getPlayerAccount(player), "position", x..","..y..","..z)
setAccountData ( getPlayerAccount(player), "skin", getElementModel(player))
setAccountData ( getPlayerAccount(player), "money", getPlayerMoney(player))

Stats_Signature.php?name=Jason_Gregory
Contact me if you need a Website / Signature ↑ / Mapuploadsystem

(HTML5, JS, PHP, ASP.NET, MySQL / Sybase)

Posted
https://wiki.multitheftauto.com/wiki/SetAccountData
x, y, z = getElementPosition(player)
setAccountData ( getPlayerAccount(player), "position", x..","..y..","..z)
setAccountData ( getPlayerAccount(player), "skin", getElementModel(player))
setAccountData ( getPlayerAccount(player), "money", getPlayerMoney(player))

use onPlayerLogin or not isGuestAccount() for checking isnt that a guest account

Posted

Jason_Gregory, do you even read? Maybe his English isn't the best but you can easily understand he needs code for saving weapons (even without reading whole question, just read topic title).

Asi.Eren, do you want to learn Lua at all or just want us to write the code for you?

Posted

@50p Yes ive read it, but i cant understand this shity english he talks :?

Here´s your Code dude

Clientside

weaponSlots = 11
ammoSlot = {}
gunSlot = {}
 
for slot = 1, weaponSlots do
if getPlayerWeapon ( player, slot ) then
         ammoSlot[slot] = getPlayerTotalAmmo ( player, slot )
         gunSlot[slot] = getPlayerWeapon ( player, slot )
end
end
-- If you want save your WEAPON CODE later than you can use ElementData -> global
for gun = 1, #gunSlot do
if gunSlot[gun] ~= nil then
setElementData(player, "weapon#"..gun, getWeaponNameFromID(gunSlot[gun])
setElementData(player, "ammo#"..gun, ammoSlot[gun])
end
end

If you find Errors post it

Stats_Signature.php?name=Jason_Gregory
Contact me if you need a Website / Signature ↑ / Mapuploadsystem

(HTML5, JS, PHP, ASP.NET, MySQL / Sybase)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...