Asi.Eren Posted April 25, 2010 Share Posted April 25, 2010 I HAVE WİNDOWS SERVER. I HAVE SAVE Skin,save xyz pos , save money , but save weapon. HELP ME PLS... Note: I Have Windows server Link to comment
Towncivilian Posted April 25, 2010 Share Posted April 25, 2010 I AM INTERESTED IN YOUR IDEAS AND WOULD LIKE TO SUBSCRIBE TO YOUR NEWSLETTER Please provide some more details. What exactly are you trying to save? A player's current weapons and ammo? Link to comment
Taalasmaa Posted April 26, 2010 Share Posted April 26, 2010 You can get easily when I release my mta account classes. Link to comment
Jason_Gregory Posted April 26, 2010 Share Posted April 26, 2010 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)) Link to comment
karlis Posted April 26, 2010 Share Posted April 26, 2010 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 Link to comment
50p Posted April 26, 2010 Share Posted April 26, 2010 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? Link to comment
Jason_Gregory Posted April 26, 2010 Share Posted April 26, 2010 @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 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