PashaBiceps Posted January 3, 2021 Posted January 3, 2021 Hello guys, I am trying to return the old skin to the player, but is not working, the player dont receive the old skin back ! Can you guys help me? local emveiculo = getPedOccupiedVehicle ( localPlayer ) local outskin tonumber(getElementData(localPlayer, "skinout")) if not emveiculo then if getElementData(localPlayer, "Male") == true then if getElementData(localPlayer, "WearingSkin") == false then skinatual = getElementModel(localPlayer) setElementData(localPlayer, "skinout", skinatual) setElementData(localPlayer, "WearingSkin", true) setTimer ( function() setElementModel (localPlayer, 34 ) end, 3500, 1 ) triggerServerEvent("itemAnims",localPlayer,localPlayer,34) else triggerServerEvent("itemAnims",localPlayer,localPlayer,34) setTimer ( function() setElementModel(localPlayer, outskin) end, 3500, 1 ) end else exports.YM_DxMessages:addBox("Male Stuff!", "error") end else exports.YM_DxMessages:addBox("U can't do that right now!", "error") end
Moderators IIYAMA Posted January 3, 2021 Moderators Posted January 3, 2021 43 minutes ago, GodKraken said: local outskin tonumber(getElementData(localPlayer, "skinout")) The syntax is incorrect, this code shouldn't be able to run. Missing: = 44 minutes ago, GodKraken said: setElementModel (localPlayer, 34 ) Set the model serverside, else other players will not be able to see it. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
PashaBiceps Posted January 5, 2021 Author Posted January 5, 2021 On 03/01/2021 at 22:45, IIYAMA said: The syntax is incorrect, this code shouldn't be able to run. Missing: = Set the model serverside, else other players will not be able to see it. Resolveu, obrigado! 1
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