Jump to content

Ajuda Spawn


Recommended Posts

Como posso fazer para que caso a pessoa esteja com certa ElementData ele spawne em um lugar diferente de quem não tem essa ElementData?

 

function entrarLocal(thePlayer)
	if getElementType( thePlayer ) == "player" and not isPedInVehicle(thePlayer) then
		if source == enterpvp then
			setElementPosition(thePlayer, tps[aleatorio][1], tps[aleatorio][2], tps[aleatorio][3], tps[aleatorio][4] ) -- Posição de Entrada no interior
            setElementData(thePlayer, "pvpak", false)
		end	
	end
end
addEventHandler("onMarkerHit", getRootElement(), entrarLocal)

function teste(source)
    local Akkkk = getElementData( source, "pvpak" )
	if source and (Akkkk) then
		setTimer(spawnPlayer, 7000, 1, source, 237.89525, 1396.99829, 10.58594, 0)
	end
end
addEventHandler("onPlayerWasted", root, teste)

 

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