abdalbaset Posted September 13, 2013 Share Posted September 13, 2013 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
Castillo Posted September 13, 2013 Share Posted September 13, 2013 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
GamerDeMTA Posted September 13, 2013 Share Posted September 13, 2013 also he needs to replace createobject to createObject, createmarker to createMarker and the events are bad. it is onMarkerHit and onMarkerLeave not onmarkhit and onmarkleave Link to comment
abdalbaset Posted September 13, 2013 Author Share Posted September 13, 2013 its not working:( (ineed metal file and clent?) Link to comment
TAPL Posted September 13, 2013 Share Posted September 13, 2013 Even the event name is wrong and there no attachedTo argument at line 11. Link to comment
abdalbaset Posted September 13, 2013 Author Share Posted September 13, 2013 can you give me new code 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