PoPaY Posted June 4, 2017 Share Posted June 4, 2017 quero adicionar a função de dar skin nesse server.lua function godCommand(player) if hasObjectPermissionTo(player, "command.kick") then if getElementData(player,"onProt") then setElementData(player,"onProt",false) outputChatBox("",player,255,255,0,true) else setElementData(player,"onProt",true) setPlayerSkin(thePlayer, 287) outputChatBox("",player,255,255,0,true) end end end addCommandHandler("pro",godCommand) coloquei em negrito o que eu acho que deveria dar a skin quando digita /pro me ajudem [URGENTE] Amanha Abro meu servidor Link to comment
koragg Posted June 4, 2017 Share Posted June 4, 2017 (edited) function godCommand(player) if hasObjectPermissionTo(player, "command.kick") then if getElementData(player,"onProt") then setElementData(player,"onProt",false) outputChatBox("",player,255,255,0,true) else setElementData(player,"onProt",true) setPlayerSkin(player, 287) outputChatBox("",player,255,255,0,true) end end end addCommandHandler("pro",godCommand) Line 8 was not 'player' but 'thePlayer' in your code Edited June 4, 2017 by koragg Link to comment
DNL291 Posted June 5, 2017 Share Posted June 5, 2017 Next time post on the Portuguese section: https://forum.multitheftauto.com/forum/127-programação-em-lua/ Btw, use setElementModel instead of setPlayerSkin as it's a deprecated function. Link to comment
Pedro861 Posted June 5, 2017 Share Posted June 5, 2017 (edited) Troque "setPlayerSkin" por "setElementModel" Edited June 5, 2017 by Pedro861 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