scolen Posted June 3, 2023 Share Posted June 3, 2023 I made a bank rob but there is a little problem with it. Even if a vehicle goes to the marker, the bomb will be installed, how to stop it? 1 Link to comment
FlorinSzasz Posted June 3, 2023 Share Posted June 3, 2023 45 minutes ago, scolen said: I made a bank rob but there is a little problem with it. Even if a vehicle goes to the marker, the bomb will be installed, how to stop it? Well u should destroy the element and set it to nil when u hit the marker. 1 Link to comment
scolen Posted June 3, 2023 Author Share Posted June 3, 2023 1 hour ago, FlorinSzasz said: Well u should destroy the element and set it to nil when u hit the marker. give example 1 Link to comment
FlorinSzasz Posted June 3, 2023 Share Posted June 3, 2023 22 minutes ago, scolen said: give example local bomb = createObject(935,x,y,z) local a = createMarker(x,y,z,"checkpoint",2.5) function MarkerHit ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer and source == a then if isElement(bomb) then destoryElement(bomb) bomb = nil end end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) 1 Link to comment
scolen Posted June 4, 2023 Author Share Posted June 4, 2023 11 hours ago, FlorinSzasz said: local bomb = createObject(935,x,y,z) local a = createMarker(x,y,z,"checkpoint",2.5) function MarkerHit ( hitPlayer, matchingDimension ) if hitPlayer == localPlayer and source == a then if isElement(bomb) then destoryElement(bomb) bomb = nil end end end addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) Please help me with this post https://forum.multitheftauto.com/topic/140811-bank-rob-script-and-there-is-a-big-problem/#comment-1022259 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