Jump to content

help


Amine#TN

Recommended Posts

i made that script as a base door i want to upgrade it 
-------------------------------------------------------------------------
local Marker1 = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100)
function Entre ( hitPlayer, matchingDimension )
setElementPosition ( hitPlayer, 1637.2869873047, -1132.6866455078, 23.90625 )
outputChatBox ( "Welcome to Los Santos Boss Area!",hitPlayer )
end
addEventHandler( "onMarkerHit", Marker1, Entre)
--------------------------------------------------------------------------
i want to make it only players on foot can enter
also zombies and other peds cant enter to this base
 

Link to comment

try this

 

local Marker1 = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100)
addEventHandler( "onMarkerHit", Marker1,function(source)
    if getElementType(source) == "player" then
        setElementPosition(source, 1637.2869873047, -1132.6866455078, 23.90625 )
        outputChatBox("Welcome to Los Santos Boss Area!",source )
    end
end)

 

Link to comment

Thats wrong.

 

Here is 

local Marker1 = createMarker (1348.4315185547, -1150.189453125, 23.700422286987, "cylinder", 4, 255, 0, 0, 100)
addEventHandler( "onMarkerHit", Marker1,function(source)
for i,v in ipairs(getElementsByType("player")) do
    setElementPosition(source, 1637.2869873047, -1132.6866455078, 23.90625 )
    outputChatBox("Welcome to Los Santos Boss Area!",source )
end
end)

 

Link to comment
local hitMarker = createMarker (1638.0502929688, -1152.9975585938, 22.5, "cylinder", 4, 255, 0, 0, 100)
function enterFunction(hitPlayer, matchingDimension)
	if getElementType(hitPlayer) == "player" and not isPedInVehicle(hitPlayer) then
		setElementPosition(hitPlayer, 1637.2869873047, -1132.6866455078, 23.90625)
		outputChatBox("Welcome to Los Santos Boss Area!", hitPlayer)
	end
end
addEventHandler( "onMarkerHit", hitMarker, enterFunction)

 

  • Like 1
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...