Amine#TN Posted March 25, 2017 Share Posted March 25, 2017 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
itHyperoX Posted March 25, 2017 Share Posted March 25, 2017 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
itHyperoX Posted March 25, 2017 Share Posted March 25, 2017 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
NeXuS™ Posted March 25, 2017 Share Posted March 25, 2017 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) 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now