Jump to content

Spawn De Veiculo por acls diferentes


Recommended Posts

Coloque o código abaixo em servidor:

local spawn = createMarker(0, 0, 0, "cylinder", 1, 255, 255, 255, 255)

addEventHandler("onMarkerHit", spawn, function(element)
	if getElementType(element) == "player" then
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("SAMU")) then
			if getPedOccupiedVehicle(element) == false then
				local x, y, z = getElementPosition(element)
				local v = createVehicle(551, x, y, z)
				warpPedIntoVehicle(element, v)
			end
		end
	end
end)

addEventHandler("onMarkerHit", spawn, function(element)
	if getElementType(element) == "player" then
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("PM")) then
			if getPedOccupiedVehicle(element) == false then
				local x, y, z = getElementPosition(element)
				local v = createVehicle(551, x, y, z)
				warpPedIntoVehicle(element, v)
			end
		end
	end
end)

 

Link to comment
local spawn = createMarker(0, 0, 0, "cylinder", 1, 255, 255, 255, 255)

addEventHandler("onMarkerHit", spawn, function(element)
	if getElementType(element) == "player" then
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("SAMU")) then
			setElementModel(element, 274)
		end
	end
end)

addEventHandler("onMarkerHit", spawn, function(element)
	if getElementType(element) == "player" then
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(element)), aclGetGroup("PM")) then
			setElementModel(element, 280)
		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...