Jump to content

مطلوووب كوود ماركر وزنية


D![G]Ao

Recommended Posts

السلام عليكم ورحمة وبركاته

اخواني : ابي كود

ماركر وزنيه

يعني مثآل : الي عنده تحميل بعد ما يدخل ماركر حقت سياره

يروح الماركر حقت الوزنيه طبعاً تكون وزنيه عشوائيه

Link to comment
كـــنت فاضي وسويته لكـ .. :

local marker = createMarker ( .... ) 
local vehicle = {   } 
local vehicles = { id, id, id } 
  
addEventHandler ( "onMarkerHit", resourceRoot, function( element ) 
    if ( source == marker ) then 
      if ( getElementType( element ) == "player" ) then 
         if ( isElement( vehicle[ element ] ) ) then destroyElement ( vehicle[ element ] ) vehicle[ element ] = nil end 
             local iD = tonumber( vehicles[math.random(#vehicles)] ) 
             vehicle[ element ] = createVehicle( iD, x, y, z ) 
              if ( vehicle[ element ] ) then 
                     warpPedIntoVehicle( element, vehicle[ element ] ) 
                   end 
             end 
       end 
end ) 
  
addEventHandler( "onPlayerQuit", root, function( ) 
  if ( vehicle[ source ] ) then  
         destroyElement( vehicle[ source ] ) 
         vehicle[ source ] = nil 
      end 
end ) 
  
addEventHandler( "onVehicleExplode", resourceRoot, function(  ) 
     setTimer( destroyElement, 2000, 1, source ) 
end ) 

setVehicleHandling تقدر تستفيد من هذا الكود واستخدم معاهـ

Link to comment
كـــنت فاضي وسويته لكـ .. :

local marker = createMarker ( .... ) 
local vehicle = {   } 
local vehicles = { id, id, id } 
  
addEventHandler ( "onMarkerHit", resourceRoot, function( element ) 
    if ( source == marker ) then 
      if ( getElementType( element ) == "player" ) then 
         if ( isElement( vehicle[ element ] ) ) then destroyElement ( vehicle[ element ] ) vehicle[ element ] = nil end 
             local iD = tonumber( vehicles[math.random(#vehicles)] ) 
             vehicle[ element ] = createVehicle( iD, x, y, z ) 
              if ( vehicle[ element ] ) then 
                     warpPedIntoVehicle( element, vehicle[ element ] ) 
                   end 
             end 
       end 
end ) 
  
addEventHandler( "onPlayerQuit", root, function( ) 
  if ( vehicle[ source ] ) then  
         destroyElement( vehicle[ source ] ) 
         vehicle[ source ] = nil 
      end 
end ) 
  
addEventHandler( "onVehicleExplode", resourceRoot, function(  ) 
     setTimer( destroyElement, 2000, 1, source ) 
end ) 

setVehicleHandling تقدر تستفيد من هذا الكود واستخدم معاهـ

يعطيك الله العافيهه لآكن آخوي اشوف فيه اي دي

يعني مع الماركر سيارهه ؟؟

Link to comment

The Best @

local Marker1 = createMarker ( -2073.50635, -109.51343, 35.32151,"cylinder", 2, 0, 255, 0 ) 
local Handling = "1600 2200 0.1 1.5 0 -1.5 70 0.5 0.8 0.7 5 999 33 16 r p 5.4 0.9 false 40 0.85 0.14 0 0.4 -0.14 0.5 0 0.26 0 45000 0 0 1 1 1" 
  
addEventHandler('onClientMarkerHit', Marker1, function( player ) 
    if ( player == localPlayer ) and ( isPedInVehicle ( player ) ) then 
        exports.hedit:importHandling ( getPedOccupiedVehicle ( player ), Handling, "SA")   
        end 
    end 
) 

تحقق أنك ضأيف هاذا بـ الميتأ لـ سكربت hedit

function="importHandling" type="client" /> 

Link to comment
The Best @
local Marker1 = createMarker ( -2073.50635, -109.51343, 35.32151,"cylinder", 2, 0, 255, 0 ) 
local Handling = "1600 2200 0.1 1.5 0 -1.5 70 0.5 0.8 0.7 5 999 33 16 r p 5.4 0.9 false 40 0.85 0.14 0 0.4 -0.14 0.5 0 0.26 0 45000 0 0 1 1 1" 
  
addEventHandler('onClientMarkerHit', Marker1, function( player ) 
    if ( player == localPlayer ) and ( isPedInVehicle ( player ) ) then 
        exports.hedit:importHandling ( getPedOccupiedVehicle ( player ), Handling, "SA")   
        end 
    end 
) 

تحقق أنك ضأيف هاذا بـ الميتأ لـ سكربت hedit

function="importHandling" type="client" /> 

خلاص اخوي تمم الافاده من قبل زاحف يعطيه العافيهه

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