golanu21 Posted December 16, 2012 Share Posted December 16, 2012 marker = createMarker ( 2161.03442, -1620.84192, 14.08922, "checkpoint", 4.0, 0, 0, 255, 255 ) mk1 = createMarker ( 2071.20850, -1556.17798, 13.41725, "checkpoint", 4.0, 0, 0, 255, 0 ) blip = createBlip ( 2161.03442, -1620.84192, 14.08922, 12, 2, 255 ) function hi() destroyElement (marker) outputChatBox( "BOT:DUTE UNDE ITI ARAT CA IEI BATAIE" ) mk1 = createMarker ( 2071.20850, -1556.17798, 13.41725, "checkpoint", 4.0, 0, 0, 255, 255 ) b1 = createBlip ( 2071.20850, -1556.17798, 13.41725, 0, 2, 255, 0, 0, 255) setMarkerColor ( mk1, 0, 0, 255, 255) end addEventHandler ( "onMarkerHit", marker, hi ) function si() outputChatBox ( "BOT:BRAVO NICULE") givePlayerMoney ( player, 1000) distroyElement (b1) distroyElement (mk1) end addEventHandler ( "onMarkerHit", mk1, si) HELP [15:06:30] WARNING: cmss\server.lua:15: Bad argument @ 'givePlayerMoney' [15:06:30] ERROR: cmss\server.lua:16: attempt to call global 'distroyElement' (a nil value) Link to comment
Vision Posted December 16, 2012 Share Posted December 16, 2012 marker = createMarker( 2161.03442, -1620.84192, 14.08922, "checkpoint", 4.0, 0, 0, 255, 255 ) mk1 = createMarker( 2071.20850, -1556.17798, 13.41725, "checkpoint", 4.0, 0, 0, 255, 0 ) blip = createBlip( 2161.03442, -1620.84192, 14.08922, 12, 2, 255 ) function hi() destroyElement( marker ) outputChatBox( "BOT:DUTE UNDE ITI ARAT CA IEI BATAIE" ) mk1 = createMarker( 2071.20850, -1556.17798, 13.41725, "checkpoint", 4.0, 0, 0, 255, 255 ) b1 = createBlip( 2071.20850, -1556.17798, 13.41725, 0, 2, 255, 0, 0, 255 ) setMarkerColor( mk1, 0, 0, 255, 255 ) end addEventHandler ( "onMarkerHit", marker, hi ) function si(player) outputChatBox( "BOT:BRAVO NICULE" ) givePlayerMoney( player, 1000 ) destroyElement( b1 ) destroyElement( mk1 ) end addEventHandler( "onMarkerHit", mk1, si) Link to comment
golanu21 Posted December 16, 2012 Author Share Posted December 16, 2012 marker = createMarker( 2161.03442, -1620.84192, 14.08922, "checkpoint", 4.0, 0, 0, 255, 255 ) blip = createBlip( 2161.03442, -1620.84192, 14.08922, 12, 2, 255 ) function hi() destroyElement( marker ) outputChatBox( "BOT:DUTE UNDE ITI ARAT CA IEI BATAIE" ) b1 = createBlip( 2071.20850, -1556.17798, 13.41725, 0, 2, 255, 0, 0, 255 ) mk1 = createMarker( 2071.20850, -1556.17798, 13.41725, "cylinder", 4.0, 0, 0, 255, 255 ) end addEventHandler ( "onMarkerHit", marker, hi ) function si(player) outputChatBox( "BOT:BRAVO NICULE" ) givePlayerMoney( player, 1000 ) destroyElement( b1 ) destroyElement( mk1 ) end addEventHandler( "onMarkerHit", mk1, si) [15:53:55] WARNING: cmss\server.lua:18: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] Link to comment
Anderl Posted December 16, 2012 Share Posted December 16, 2012 You deleted "mk1" marker, it's obvious that the event is not going to work since it's trying to attach to a nil variable. 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