Jump to content

ممكن حد يمسحو


Recommended Posts

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
  
  
------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
  
  
------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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...