PoPaY Posted June 4, 2017 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
koragg Posted June 4, 2017 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 I love rock/metal/pop but don't mind any other music genre except чалга...that thing sux I also love cars PS I'm friendly
DNL291 Posted June 5, 2017 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. Please do not PM me with scripting related question nor support, use the forums instead.
Pedro861 Posted June 5, 2017 Posted June 5, 2017 (edited) Troque "setPlayerSkin" por "setElementModel" Edited June 5, 2017 by Pedro861
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