Sign in to follow this  
White141516

[AJUDA] COMANDO

Recommended Posts

Existe algum comando para levantar alguém? tipo um slap só que sem dar danos e essas coisas.

Share this post


Link to post

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)

Share this post


Link to post
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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.