#Al-Ha[J]aRii Posted July 2, 2013 Posted July 2, 2013 addEventHandler( "onPlayerWasted", getRootElement( ), function ( ) -- Place for spawn setTimer ( spawnPlayer, 3000, 1, source, 2034, -1414, 16.3 ) -- Saving Part local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local playermoney = getPlayerMoney ( source ) local skin = getElementModel ( source ) local pos = getElementPosition ( source ) setAccountData ( playeraccount, "acc", playermoney ) setAccountData ( playeraccount, "skin", skin ) end -- Loading part local player = getRootElement() if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "acc" ) local skin = getAccountData ( playeraccount, "skin" ) -- Money if ( playermoney ) then setPlayerMoney ( source, playermoney ) end -- Skin if ( skin ) then setElementModel ( source, skin ) else outputChatBox ( "NO SKIN SAVED!", source ) end end end ) I edited something, but it doesn't load my skin. the data wil be when player wasted ?? Try a little harder to be a little better I Can Made To You Any Script For $ Skype : alhajarii-mtasa
papam77 Posted July 2, 2013 Author Posted July 2, 2013 Yes, it must load skin which player had before death.
#Al-Ha[J]aRii Posted July 2, 2013 Posted July 2, 2013 Yes, it must load skin which player had before death. i think wil be error why ? because you wil saved data in player account and if player is guest ?? what wil be he didn't wil saved skin . ====================================================================== also i think you don't need when player wasted money and his position . and when player spawn will get data skin from wasted i think you need to use "onPlayerSpawn" so wil be like this : addEventHandler( "onPlayerWasted", getRootElement( ), function ( ) setTimer ( spawnPlayer, 3000, 1, source, 2034, -1414, 16.3 ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local skin = getElementModel ( source ) setAccountData ( playeraccount, "skin", skin ) if (playeraccount) and isGuestAccount ( playeraccount ) then return outputChatBox("Sorry . but you are guest you missing save skin . !",source,255,0,0,true) end end ) addEventHandler("onPlayerSpawn",getRootElement( ), function() if ( playeraccount ) then local skin = getAccountData ( playeraccount, "skin" ) if ( skin ) then setElementModel ( source, skin ) else outputChatBox ( "NO SKIN SAVED!", source ) end end ) Try a little harder to be a little better I Can Made To You Any Script For $ Skype : alhajarii-mtasa
#Al-Ha[J]aRii Posted July 3, 2013 Posted July 3, 2013 It doesn't load my old skin. try delet line 15 and is there any error with debugscript 3 ? Try a little harder to be a little better I Can Made To You Any Script For $ Skype : alhajarii-mtasa
PaiN^ Posted July 3, 2013 Posted July 3, 2013 addEventHandler( "onPlayerWasted", getRootElement( ), function ( ) setTimer ( spawnPlayer, 3000, 1, source, 2034, -1414, 16.3 ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local skin = getElementModel( source ) setAccountData( playeraccount, "skin", skin ) end end ) addEventHandler("onPlayerSpawn",getRootElement( ), function( ) local playeraccount = getPlayerAccount( source ) if playeraccount and not isGuestAccount( playeraccount ) then local skin = getAccountData( playeraccount, "skin" ) if skin then setElementModel( source, skin ) else outputChatBox( "NO SKIN SAVED!", source ) end end end ) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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