stefutz101 Posted April 10, 2016 Share Posted April 10, 2016 function matura(source) local marker = createMarker( 0, 0, 0, "cylinder", 3, 255, 0, 0, 170, source) local blip = createBlip(0, 0, 0,0,2,255,0,0,255,0,2000,source) addEventHandler( "onMarkerHit", marker, MarkerHit1) end addCommandHandler("broom",matura) function MarkerHit1( hitElement, matchingDimension ) if isElement(source) and getElementType(source)=="marker" then destroyElement(source) end if isElement(blip) and getElementType(blip)=="blip" then destroyElement(blip) end end How i can destroy a blip on marker hit ? I should tigger a function ? To do that ? EDIT: triggerServerEvent ( "delmarker", blip) ----------------------- function destroyblip(blip) if isElement(blip) and getElementType(blip)=="blip" then destroyElement(blip) end end addEvent ( "delmarker", true ) addCommandHandler("delmarker",destroyblip) Cand i do like this ? Link to comment
*Shad0w Posted April 11, 2016 Share Posted April 11, 2016 Must first see and learn how to use a trigger correctly ... https://wiki.multitheftauto.com/wiki/TriggerServerEvent Link to comment
stefutz101 Posted April 11, 2016 Author Share Posted April 11, 2016 "This is the primary means of passing information between the client and the server." Source : Wiki. Ok i got it. 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