Jump to content

مساعده


Recommended Posts

في مود انا سويته

local ca3 = { { 0, 0, 3 }, { 0, 0, 3 }, { 0, 0, 3 }, { 0, 0, 3 } } 
  
local marker = {   --You can add more locations here 
    { 511.94174194336, -1655.2518310547, 18.948333740234 }, 
    { 1841.0515136719, -1797.8941650391, 13.546875 } 
} 
  
local vehicle_ = {} 
local blip = {} 
local rand = {} 
local Markers = {} 
  
function CreatCarRandom () 
    rand.random = ca3[math.random(#ca3)] 
    vehicle_.car = createVehicle(560, 2228.9113769531, -1152.0667724609, 25.854433059692) 
    blip.blip1Car = createBlipAttachedTo(vehicle_.car, 53) 
end 
addEventHandler("onResourceStart", root, CreatCarRandom) 
  
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle) 
        if(isElement(vehicle_.car))then 
            if (vehicle == vehicle_.car) then   
                local x,y,z = unpack(marker[math.random(#marker)]) 
                Markers.Marker = createMarker(x, y, z, "cylinder", 5, 0, 0, 205, 170) 
                blip.blipCar2 = createBlipAttachedTo(Markers.Marker, 51) 
                setElementVisibleTo(Markers.Marker, root, false) 
                setElementVisibleTo(Markers.Marker, source, true) 
            end 
        end 
    end 
) 
    
addEventHandler( "onMarkerHit", root, 
    function(hitElement) 
        if ( getElementType( hitElement ) == "player" ) then 
            if( isPedInVehicle( hitElement ) )then 
                givePlayerMoney ( hitElement, math.random(10000,10001) ) 
                triggerClientEvent(hitElement, "playSoundC", hitElement) 
                for i,v in pairs(vehicle_) do 
                    destroyElement(v) 
                end 
                for i,v in pairs(Markers) do 
                    destroyElement(v) 
                end 
                for i,v in pairs(blip) do 
                    destroyElement(v) 
                end 
                CreatCarRandom () 
                
            end 
        end 
    end 
) 
  

1-بدي اخلي كل دقيقتين

2-كل الي فلسياره ياخذ الفلوس

ارجو الرد السريع

Link to comment
addEventHandler("onPlayerVehicleEnter", root, 
    function(vehicle) 
        if(isElement(vehicle_.car))then 
            if (vehicle == vehicle_.car) then   
                local x,y,z = unpack(marker[math.random(#marker)]) 
                Markers.Marker = createMarker(x, y, z, "cylinder", 5, 0, 0, 205, 170) 
                blip.blipCar2 = createBlipAttachedTo(Markers.Marker, 51) 
                setElementVisibleTo(Markers.Marker, root, false) 
                setElementVisibleTo(Markers.Marker, source, true) 
setTimer ( function() 
 givePlayerMoney(source,2000) 
    end, 2000, 0 ) 
            end 
        end 
    end 
) 

Link to comment

server#

function restartFunction( ) 
y = createMarker(x, y, z, "cylinder", 5, 0, 0, 205, 170) 
    vehicle = createVehicle(560, 2228.9113769531, -1152.0667724609, 25.854433059692)  
end 
  
addEventHandler( "onMarkerHit", root, 
  function(element) 
  if source == marker then 
  if getElementType(element) == "player" then 
      local vehicle = getPedOccupiedVehicle (element) 
  if vehicle then 
      occupants = getVehicleOccupants(vehicle) 
  for i,v in pairs(occupants) do  
     givePlayerMoney ( v, 2000 ) 
     destroyElement(y) 
     destroyElement(vehicle)    
setTimer(restartFunction, 60000*2, 1) 
end 
 end 
  end 
   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...