m4rsje Posted June 26, 2010 Share Posted June 26, 2010 hey guys, im trying to make a skin save system (SSS), but its not really working, i quited mta for like 5-6 months or something like that? and i almost cant remember anything of the scripting so could any1 please fix this, it gives you skin 0, and imposible to change it with admin panel : function onPlayerWasted ( ) local account = getPlayerAccount ( source ) if ( account ) then local playerskin = getPedSkin ( source ) setAccountData ( account, "skin", playerskin ) spawnPlayer(source, 1607, 1817, 11) setPedSkin ( source, playerskin ) end end addEventHandler ( "onPlayerWasted", getRootElement ( ), onPlayerWasted ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end function onPlayerSpawn ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) addEventHandler ( "onPlayerSpawn", getRootElement ( ), onPlayerSpawn ) thx <3 Link to comment
dzek (varez) Posted June 26, 2010 Share Posted June 26, 2010 debug read wiki blablabla setPedSkin is deprecated, use setElementModel instead, so now: read wiki debug profit Link to comment
[DMC] Posted June 26, 2010 Share Posted June 26, 2010 comnunity? --[Made By Kevin11]-- --[if youre looking at this script u agreeing with the readme file]-- function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end function onPlayerSpawn ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getAccountData ( playeraccount, "skin" ) if ( playerskin ) then setPedSkin ( source, playerskin ) end end end function onPlayerWasted ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerskin = getPedSkin ( source ) setAccountData ( playeraccount, "skin", playerskin ) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) addEventHandler ( "onPlayerSpawn", getRootElement ( ), onPlayerSpawn ) addEventHandler ( "onPlayerWasted", getRootElement ( ), onPlayerWasted ) Link to comment
m4rsje Posted June 26, 2010 Author Share Posted June 26, 2010 yeah i got it from the community but, i tryed a few times my self but failed it and got desprate so ill try the element Link to comment
[DMC] Posted June 26, 2010 Share Posted June 26, 2010 yeah i got it from the community but, i tryed a few times my self but failed it and got desprate so ill try the element uhm you want to save skins right? then just use this one Link to comment
m4rsje Posted June 26, 2010 Author Share Posted June 26, 2010 wich one? you edited it? bec the one from the community isn't working Link to comment
[DMC] Posted June 26, 2010 Share Posted June 26, 2010 wich one? you edited it?bec the one from the community isn't working no i didnt edit it so it must be you 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