SonicTHedgehog Posted July 22, 2011 Share Posted July 22, 2011 I am trying to make a marker and when player get in it his team set to police(and if u can tell/show me how to make it with "yes & no" buttons) then it shows what i wrote on the chatbox i think every thing is right exept the set team part.. when i try it .. it says ,(, expected near ,if, in the server.exe .. please help me .. and as what i said last time .... i am new in scripting so i need help. thanks function policeinfomarkeronStartup () policeinfoChangeMarker = createMarker (1554.5867919922, -1675.6022949219, 16.1953125, "cylinder", 1.5, 255, 0, 0, 255, getRootElement()) end addEventHandler("onResourceStart", getRootElement(), policeinfomarkeronStartup) function policeinfomarker (hitPlayer, matchingDimension) if (source == policeinfoChangeMarker) then outputChatBox ("Now you are a police but you need police clothes and stick", hitPlayer, 255, 0, 0, false) outputChatBox ("Go and get them from LasVentas PoliceStation", hitPlayer, 255, 0, 0, false) outputChatBox ("Good luck", hitPlayer, 255, 0, 0, false) end end addEventHandler("onMarkerHit", getRootElement(), policeinfomarker) function policeinfomarker (hitPlayer, matchingDimension) if (source == policeinfoChangeMarker) then local r, g, b = getTeamColor(Police) setPlayerTeam(player, Police) end addEventHandler("onMarkerHit", getRootElement(), policeinfomarker) Link to comment
#Paper Posted July 22, 2011 Share Posted July 22, 2011 addEventHandler("onMarkerHit", getRootElement(), policeinfomarker) delete getRootElement() and insert the marker name (do it for all onMarkerHit) P.S: Read more the wiki 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