golanu21 Posted February 27, 2013 Share Posted February 27, 2013 marker = createMarker ( 2532.8000488281, -1666.0999755859, 14.199999809265, "cylinder", 1, 255, 0, 0, 255 ) function takejob( thePlayer ) toggleAllControls ( thePlayer, false ) setTimer ( toggleAllControls, 10000, 1, thePlayer, true ) outputChatBox ("*State Forist ii da lui "..getPlayerName(thePlayer).." o ranga. ", root, 0, 0, 255 ) outputChatBox ("[state Forist] : Dute si fura din casele oamenilor, dar asteapta 10 secunde. ", root, 255, 0, 0 ) outputChatBox ( " ["..getPlayerName(thePlayer).."]: Stau", root, 255, 0, 0 ) h1 = createMarker ( 2459.5, -1691.4000244141, 12.5, "cylinder", 1, 255, 0, 0, 255 ) end addEventHandler ( "onMarkerHit", marker, takejob ) function delete ( thePlayer ) destroyElement ( marker ) outputChatBox ("[state Forist] : La revedere, si ai grija. ", root, 255, 0, 0 ) outputChatBox ( " ["..getPlayerName(thePlayer).."]: Mersi, pa...", root, 255, 0, 0 ) end addEventHandler ( "onMarkerLeave", marker, delete ) function ho1( thePlayer ) toggleAllControls ( thePlayer, false ) setTimer ( toggleAllControls, 10000, 1, thePlayer, true ) outputChatBox ( " *["..getPlayerName(thePlayer).."] intra in casa si incepe sa fure. 'Va termina in 10 secunde'", root, 0, 0, 255 ) fadeCamera ( source, false, 1.0, 255, 0, 0 ) outputChatBox ( "Ai furat 50.000$ din aceasta casa.", root, 0, 255, 0 ) givePlayerMoney ( 50000 ) setTimer ( fadeCamera, 10000, 1, source, true, 0.5 ) end addEventHandler ( "onMarkerHit", h1, ho1 ) function dh1( thePlayer ) destroyElement ( h1 ) outputChatBox ( " *"..getPlayerName(thePlayer).."a jefuit casa.", root, 0, 0, 255 ) end addEventHandler ( "onMarkerLeave", h1, dh1 ) and the error is 29, 35 : Bad argument addEventHandler ( element 2 ) Link to comment
PaiN^ Posted February 27, 2013 Share Posted February 27, 2013 It because you made the marker ( h1 ) inside the takeJob function ..! Link to comment
golanu21 Posted February 27, 2013 Author Share Posted February 27, 2013 But, i want to create a marker, when thePlayer enter in the marker 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