Jump to content

Moving Gate Problem


Recommended Posts

I Had Made A Moving Gate Script But Its Not Working Can U Get It Working

object = createObject ( 985, 2497.3000488281, 2777, 11.5, 0, 0, 90 )

maker = createMarker ( 2497.6999511719, 2776.3000488281, 5.5999999046326, "cylinder", 12, 0, 0, 0, 0 )

object2 = createObject ( 986, 2497.3000488281, 2769.8000488281, 11.60000038147, 0, 0, 90)

maker2 = createMarker ( 2497.3000488281, 2770, 5.5, "cylinder", 10, 0, 0, 0, 0 )

function gateo ( player )

if ( getElementType ( player ) == "vehicle" ) then

player = getVehicleController ( player )

end

if ( source == maker ) then

local skin = getElementModel ( player )

if ( skin == 287 ) then

moveObject ( object, 985, 2497.3000488281, 2777, 11.5, 0, 0, 90 )

else

outputChatBox ( "Sorry, You're Not a United States Anti-Virus Squad, You can't enter in this base. ", player, 255, 0, 0 )

end

elseif ( source == maker2 ) then

local skin = getElementModel ( player )

if ( skin == 287 ) then

moveObject ( object2, 986, 2497.3000488281, 2769.8000488281, 11.60000038147, 0, 0, 90 )

else

outputChatBox ( "Sorry, You're Not a United States Anti-Virus Squad, You can't enter in this base. ", player, 255, 0, 0 )

end

end

end

addEventHandler ( "onMarkerHit", root, gateo )

function getec ( player )

if ( source == maker ) then

moveObject ( object, 985, 2497.3000488281, 2777, 11.5, 0, 0, 90 )

elseif ( source == maker2 ) then

moveObject ( object2, 986, 2497.3000488281, 2769.8000488281, 11.60000038147, 0, 0, 90 )

end

end

addEventHandler ( "onMarkerLeave", root, getec )

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