Jump to content

Script garagem BGO. queria so desespawnar o veiculo so no marker tem como?


Recommended Posts

--------------------------------------------------------------
-- © [2019] Varzen Advanced [2019]                        © --
-- © Creditos: Varzen Advanced                            © --
-- © Facebook: https://www.facebook.com/VarzenAdvanced    © --
-- © Youtube: http://www.youtube.com/c/VarzenBR           © --
-- © Blog: https://varzenadvanced.blogspot.com/           © --
--------------------------------------------------------------

addEvent("updateINTDIM2", true)
addEventHandler("updateINTDIM2", getRootElement(), function (vehicleId)
		for index, value in ipairs (getElementsByType("vehicle")) do
			if getElementData(value, "ID") == tonumber(vehicleId) then
				if getElementData(value, "ownercar") == getElementData(source, "ID") then
					setElementInterior(value,0)
					setElementDimension(value,0)
					local x, y, z = getElementPosition(source)
					setElementPosition(value, x, y, z)
					warpPedIntoVehicle(source,value)
			end
		end
	end
end
)

addEvent("guardar", true)
addEventHandler("guardar", getRootElement(), function (vehicleId)
		for index, value in ipairs (getElementsByType("vehicle")) do
			if getElementData(value, "ID") == tonumber(vehicleId) then
				if getElementData(value, "ownercar") == getElementData(source, "ID") then
				local gerarposicao = math.random(50,100)
					setElementPosition(value,1805.39368, -2448.51196, 13.44729)
					setElementInterior(value,gerarposicao)
					setElementDimension(value,gerarposicao)
					outputChatBox("#9ACD32[SRP] #ffffffVeículo Guardado.",source,0,0,0,true)
			end
		end
	end
end
)

addEvent("updateINTDIM22", true)
addEventHandler("updateINTDIM22", getRootElement(), function (vehicleId)
		for index, value in ipairs (getElementsByType("vehicle")) do
			if getElementData(value, "ID") == tonumber(vehicleId) then
				if getElementData(value, "ownercar") == getElementData(source, "ID") then
					setElementInterior(value,0)
					setElementDimension(value,0)
			end
		end
	end
end
)

 

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