Jump to content

Recommended Posts

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
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 :P

Edited by koragg
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...