Jump to content

[AJUDA] COMANDO


Recommended Posts

Não cheguei a testar, mas ta ae:

function getPlayerID(id)
	v = false
	for i, player in ipairs (getElementsByType("player")) do
		if getElementData(player, "ID") == id then
			v = player
			break
		end
	end
	return v
end

function levantarP(player, command, id, ...)
	if hasObjectPermissionTo("player", "command.kick") == false then return end
    if(id) then
        local playerID = tonumber(id)
		if(playerID) then
			local Player2 = getPlayerID(playerID)
			if(Player2) then	
				local x, y, z = getElementPosition(Player2)
				setElementPosition(Player2, x, y, z + 2)
				outputChatBox("Você levantou o jogador "..Player2, player, 255, 0, 0, true)
			end
		end
	end
end
addCommandHandler("levantar", levantarP)

Só digitar /levantar ID

(apenas staffs conseguem usar o comando)

Link to comment
On 30/06/2020 at 11:55, ber said:

Não cheguei a testar, mas ta ae:


function getPlayerID(id)
	v = false
	for i, player in ipairs (getElementsByType("player")) do
		if getElementData(player, "ID") == id then
			v = player
			break
		end
	end
	return v
end

function levantarP(player, command, id, ...)
	if hasObjectPermissionTo("player", "command.kick") == false then return end
    if(id) then
        local playerID = tonumber(id)
		if(playerID) then
			local Player2 = getPlayerID(playerID)
			if(Player2) then	
				local x, y, z = getElementPosition(Player2)
				setElementPosition(Player2, x, y, z + 2)
				outputChatBox("Você levantou o jogador "..Player2, player, 255, 0, 0, true)
			end
		end
	end
end
addCommandHandler("levantar", levantarP)

Só digitar /levantar ID

(apenas staffs conseguem usar o comando)

Obrigado :V

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...