Jump to content

gate problem


abdalbaset

Recommended Posts

why this script not working?

object = createobject(980,1545.6999511719,-1627,15.199999809265) 
marker = creatmarker(980,1545.6999511719,-1627,15.199999809265,"cylinder",6,100,0,0,100) 
function gateo(player)--to name our function 
     local data =getElementData (player,"job") 
     if (data=="police")then      
        moveObject(airportgate,500,980,545.6999511719,-1627,8) 
    else 
       outputchatbox("sory,you're not policeman you cant enter",player,255,0,0)  
end 
  
addEventhandler("onMarkhit",gateo) 
function gatec(player) 
       moveObject(object,980,1545.6999511719,-1627,15.199999809265) 
end 
addeventhandler("onMarkLeave",root,gatec)       
        
        
  

Link to comment

You've got several problems there, you are using lower case, but Lua is case-sensitive, you have to write it exactly like it says on the wiki.

So, change "outputchatbox" to "outputChatBox" and "addeventhandler" to "addEventHandler".

You also have a missing end at "gateo" function.

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