3NAD Posted August 7, 2012 Share Posted August 7, 2012 السسلآم عليككم ورححمة الله و بركاته عندي مششكلة بـ اككواد الحفظ والإسسترججاع setAccountData + getAccountData اللي مآنبي نططول كلآم تفضضلوا الأكواد .. function Quit() local x,y,z = getElementPosition (source) local playeraccount = getPlayerAccount ( source ) function() if ( playeraccount ) and not isGuestAccount ( playeraccount ) then setAccountData ( playeraccount, "enad.money", getPlayerMoney ( source ) ) setAccountData ( playeraccount, "enad.skin", getElementModel ( source ) ) setAccountData ( playeraccount, "enad.health", getElementHealth ( source ) ) setAccountData ( playeraccount, "enad.armor", getPedArmor ( source ) ) setAccountData ( playeraccount, "enad.posX", x ) setAccountData ( playeraccount, "enad.posY", y ) setAccountData ( playeraccount, "enad.posZ", z ) setAccountData ( playeraccount, "enad.interior", getElementInterior ( source ) ) setAccountData ( playeraccount, "enad.dimension", getElementDimension ( source ) ) setAccountData ( playeraccount, "enad.weapon", getPedWeapon ( source ) ) setAccountData ( playeraccount, "enad.team", getPlayerTeam ( source ) ) end end end addEventHandler("onPlayerQuit",root,Quit) ---------- function join() local playeraccount = getPlayerAccount ( source ) local playerMoney = getAccountData(playerAccount, "enad.money") local playerSkin = getAccountData(playerAccount, "enad.skin") local playerHealth = getAccountData(playerAccount, "enad.health") local playerArmor = getAccountData(playerAccount, "enad.armor") local playerX = getAccountData(playerAccount, "enad.posX") local playerY = getAccountData(playerAccount, "enad.posY") local playerZ = getAccountData(playerAccount, "enad.posZ") local playerInterior = getAccountData(playerAccount, "enad.interior") local playerDimension = getAccountData(playerAccount, "enad.dimension") local playerWeapon = getAccountData(playerAccount, "enad.weapon") local playerTeam = getAccountData(playerAccount, "enad.team") spawnPlayer ( source, playerX+1, playerY+1, playerZ, 0, playerSkin, 0, 0, playerTeam) fadeCamera (source, true) setCameraTarget (source, source) setPlayerMoney ( player , playerMoney ) setElementHealth ( source , playerHealth ) setPedArmor ( source , playerArmor ) setElementInterior ( source , playerInterior ) setElementDimension ( source , playerDimension ) giveWeapon ( source , playerWeapon ) end addEventHandler( "onPlayerJoin", getRootElement(), join) / الخططآ 'getAccountData' [Expected account at argument 1, got nil] attempt to perform arithmetic on local 'playerX' (a boolean value) وششكراً لككم مقدماً Link to comment
Al3grab Posted August 7, 2012 Share Posted August 7, 2012 function Quit() local x,y,z = getElementPosition (source) local playeraccount = getPlayerAccount ( source ) if not playeraccount or isGuestAccount(playeraccount) then return end setAccountData ( playeraccount, "enad.money", getPlayerMoney ( source ) ) setAccountData ( playeraccount, "enad.skin", getElementModel ( source ) ) setAccountData ( playeraccount, "enad.health", getElementHealth ( source ) ) setAccountData ( playeraccount, "enad.armor", getPedArmor ( source ) ) setAccountData ( playeraccount, "enad.posX", x ) setAccountData ( playeraccount, "enad.posY", y ) setAccountData ( playeraccount, "enad.posZ", z ) setAccountData ( playeraccount, "enad.interior", getElementInterior ( source ) ) setAccountData ( playeraccount, "enad.dimension", getElementDimension ( source ) ) setAccountData ( playeraccount, "enad.weapon", getPedWeapon ( source ) ) setAccountData ( playeraccount, "enad.team", getPlayerTeam ( source ) ) end addEventHandler("onPlayerQuit",root,Quit) ---------- function join(_,playerAccount) local playerMoney = getAccountData(playerAccount, "enad.money") local playerSkin = getAccountData(playerAccount, "enad.skin") local playerHealth = getAccountData(playerAccount, "enad.health") local playerArmor = getAccountData(playerAccount, "enad.armor") local playerX = getAccountData(playerAccount, "enad.posX") local playerY = getAccountData(playerAccount, "enad.posY") local playerZ = getAccountData(playerAccount, "enad.posZ") local playerInterior = getAccountData(playerAccount, "enad.interior") local playerDimension = getAccountData(playerAccount, "enad.dimension") local playerWeapon = getAccountData(playerAccount, "enad.weapon") local playerTeam = getAccountData(playerAccount, "enad.team") spawnPlayer ( source, playerX+1, playerY+1, playerZ, 0, playerSkin, 0, 0, playerTeam) fadeCamera (source, true) setCameraTarget (source, source) setPlayerMoney ( source , playerMoney ) setElementHealth ( source , playerHealth ) setPedArmor ( source , playerArmor ) setElementInterior ( source , playerInterior ) setElementDimension ( source , playerDimension ) giveWeapon ( source , playerWeapon ) end addEventHandler( "onPlayerLogin", getRootElement(), join) Link to comment
3NAD Posted August 7, 2012 Author Share Posted August 7, 2012 LOOOL =D Thnx 3grab (L) 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