Ahmed Eka Posted August 10, 2016 Share Posted August 10, 2016 (edited) خلص Edited August 10, 2016 by Guest Link to comment
#Soking Posted August 10, 2016 Share Posted August 10, 2016 addEvent('EventFix', true) addEventHandler('EventFix', getRootElement ( ) , function ( vehicleToBeFixed ) if ( getElementHealth(vehicleToBeFixed) < 1000 ) then fixVehicle(vehicleToBeFixed) givePlayerMoney ( source , 5000 ) end end ) aMarker_ = createMarker(-1781.32007, 1205.82617, 25.12500-1,"cylinder",3.2,74, 16, 255, 150) addEventHandler("onClientMarkerHit",root, function ( Player ) if ( source == aMarker_ and Player == localPlayer and isPedInVehicle(Player) ) then local vehicleToBeFixed = getVehicleTowedByVehicle( getPedOccupiedVehicle(Player) ) triggerServerEvent("EventFix", localPlayer , vehicleToBeFixed ) setMarkerColor ( aMarker_, 0, 255, 0, 255 ) end end ) Link to comment
Kara Posted August 10, 2016 Share Posted August 10, 2016 ------server side fixingMarker2 = createMarker(1777.45068,1238.43726,6.89240,"cylinder",3.2,74, 16, 255, 150) addEventHandler('onMarkerHit',fixingMarker2,function(hit) if getElementType(hit) == 'player' and isPedInVehicle(hit) then local vehicleToBeFixed = getVehicleTowedByVehicle( getPedOccupiedVehicle(hit) ) givePlayerMoney (hit,5000) fixVehicle(vehicleToBeFixed) setMarkerColor ( fixingMarker2, 0, 255, 0, 255 ) end end ) Link to comment
#Soking Posted August 10, 2016 Share Posted August 10, 2016 ------server side fixingMarker2 = createMarker(1777.45068,1238.43726,6.89240,"cylinder",3.2,74, 16, 255, 150) addEventHandler('onMarkerHit',fixingMarker2,function(hit) if getElementType(hit) == 'player' and isPedInVehicle(hit) then local vehicleToBeFixed = getVehicleTowedByVehicle( getPedOccupiedVehicle(hit) ) givePlayerMoney (hit,5000) fixVehicle(vehicleToBeFixed) setMarkerColor ( fixingMarker2, 0, 255, 0, 255 ) end end ) شيل الكود بسرعه لاحد يجي يحطمك ضض 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