Sisqo0 Posted August 9, 2018 Share Posted August 9, 2018 Guys, i made a marker in dayz that when i get in it i got new skin in dayz and the skin worked and all things fine but when i get the new skin after 10-15 second my last skin back and my new skin has gone . how to fix that ? newskin = createMarker ( 1856.0751, 851.0827, 9.408, "cylinder", 1.5, 255, 255, 0, 170 ) function skin(hitPlayer) if getElementType(hitPlayer) == "player" then setPlayerSkin ( hitPlayer, 211 ) end end addEventHandler ( "onMarkerHit", newskin, skin ) Link to comment
knightscript Posted August 10, 2018 Share Posted August 10, 2018 (edited) This is because DayZ gamemode has a protection, you should look for a timer in your gamemode that does something like this local skin = getElementData(player,"skin") if (skin ~= getElementModel(player) then setElementModel(player,skin) end if you find this, check the element data, and just add setElementData(player,"DATANAME",YOURSKINID) example, if your DayZ protection dataname is "DayZSkin", and the skin you set is 150 setElementData(player,"DayZSkin",150) FULL CODE With dataname "DayZSkin": newskin = createMarker ( 1856.0751, 851.0827, 9.408, "cylinder", 1.5, 255, 255, 0, 170 ) function skin(hitPlayer) if getElementType(hitPlayer) == "player" then setPlayerSkin ( hitPlayer, 211 ) setElementData( hitPlayer, "DayZSkin",211) --this is what you must add. end end addEventHandler ( "onMarkerHit", newskin, skin ) Edited August 10, 2018 by knightscript added full code example 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