Jump to content

طلب كود ماركرالسيارات مضمون


Recommended Posts

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

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 ) 
Link to comment
local marker = createMarker(x,y,z, "cylinder", size, r, g, b, 255 ) 
  

x,y,z = احدثياتكـ

cylinder = نوع الماركر دآئري

size = حجم الماركر

r,g,b = لون الماركر

255 = درجه اخفاء الماركر خلها مثل ما هي

Link to comment
لوحه اختيار السياره

محسسب هنا منتدى للأكواد الـ ' جاهزة ' ذذ

الكود ذا مطروح من قبل وسويت له اقتباس .. بس تبي نسوي لك كود كامل مع لوحة وقريد ليست ومدري وش > <

الكود ذا يفديكـ حاول بـ نفسكـ

Link to comment

لو بحثت بـ المنتدى كنت لقيته .. لقيته لكـ

Client Side !

Wnd1 = guiCreateWindow ( 0.2, 0.2, 0.25, 0.5, "Free Vehicles", true ) 
guiSetAlpha( Wnd1, 1 ) 
buttonv = guiCreateButton ( 0.5, 0.8, 0.45, 0.15, "close", true, Wnd1 ) 
button1v = guiCreateButton ( 0.01, 0.8, 0.45, 0.15, "Selection", true, Wnd1 ) 
grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Wnd1) 
label = guiCreateLabel ( 0.1, 0.1, 0.9, 0.1, "get free vehicle", true, Wnd1 ) 
showCursor(false) 
guiSetVisible( Wnd1, false ) 
guiWindowSetSizable( Wnd1, false ) 
guiWindowSetMovable( Wnd1, false )    
  
vehicles = { 
{"Police LS", 596}, 
{"Police SF", 597}, 
{"Police LV", 598}, 
{"Police Ranger", 599}, 
{"HPV1000", 523}, 
{"Enforcer", 427}, 
{"ENTER", 427}, 
}      
guiGridListAddColumn(grid, "Vehicles", 0.85)      
  
for i,veh in ipairs(vehicles) do                   
row = guiGridListAddRow(grid)          
guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) 
guiGridListSetItemData(grid, row, 1, tostring(veh[2])) 
end 
          
function useP() 
  local row, col = guiGridListGetSelectedItem (  grid )    
   if ( row and col and row ~= -1 and col ~= -1 ) then 
        local model  = tonumber( guiGridListGetItemData( grid, guiGridListGetSelectedItem( grid ) ) ) 
     if model and model ~= '' then 
          triggerServerEvent("CreVehicePv", localPlayer, model) 
          guiSetVisible(Wnd1,false) 
          showCursor(false) 
        end 
    end 
end 
addEventHandler("onClientGUIClick", button1v, useP, false) 
      
function close() 
  if (source == buttonv) then 
    guiSetVisible(Wnd1,false) 
    showCursor(false) 
  end 
end 
addEventHandler("onClientGUIClick", buttonv, close) 
        
function showGUIpv() 
      guiSetVisible(Wnd1,true) 
      showCursor(true) 
end 
addEvent("showGUIpv",true) 
addEventHandler("showGUIpv", getRootElement(), showGUIpv) 

-------------------------

Server Side !

markerpv = createMarker( 1847.0590820313, -2552.94140625, 12.55, "cylinder", 2, 0, 0, 255, 255 ) 
  
local vehicles = {} 
      
function spawnVehp( model ) 
local x, y, z = getElementPosition(source) 
if isElement(vehicles[source]) then destroyElement(vehicles[source]) end 
vehicles[source] = createVehicle(model, x + 2, y, z) 
warpPedIntoVehicle(source, vehicles[source]) 
end 
addEvent("CreVehicePv",true) 
addEventHandler("CreVehicePv", root, spawnVehp) 
      
addEventHandler('onPlayerQuit', root,function() 
    if isElement(vehicles[source]) then 
        destroyElement(vehicles[source]) 
            vehicles[source] = nil 
         end 
    end 
) 
  
  
addEventHandler ( "onMarkerHit", markerpv, function ( za7f ) 
   if getElementType ( za7f ) == "player" then 
    if ( getElementData( za7f, "Group" ) == "G" ) then 
      triggerClientEvent (za7f, "showGUIpv", za7f) 
     end 
  end    
end 
) 

بس تراه للقروبات .. عدل عليه بحيث تشيل التحقق من داتا اللاعب والاند وخلاص .

Link to comment

وكمان لما اسوي ري فريش في اف 8 عشان يركب الكود يطلعلي كذا

[14:02:50] ERROR: Couldn't parse meta file for resource 'fr'

[14:02:50] Loading of resource 'fr' failed

[14:02:50] ERROR: Couldn't parse meta file for resource 'mm'

[14:02:50] Loading of resource 'mm' failed

ERROR: Couldn't parse meta file for resource 'fr'

Loading of resource 'fr' failed

ERROR: Couldn't parse meta file for resource 'mm'

Loading of resource 'mm' failed

اسم الملف fr

Link to comment
وكمان لما اسوي ري فريش في اف 8 عشان يركب الكود يطلعلي كذا

[14:02:50] ERROR: Couldn't parse meta file for resource 'fr'

[14:02:50] Loading of resource 'fr' failed

[14:02:50] ERROR: Couldn't parse meta file for resource 'mm'

[14:02:50] Loading of resource 'mm' failed

ERROR: Couldn't parse meta file for resource 'fr'

Loading of resource 'fr' failed

ERROR: Couldn't parse meta file for resource 'mm'

Loading of resource 'mm' failed

اسم الملف fr


لاتسوي فراغات ولاتخلي التايب بالكبيتل

:lol:

Edited by Guest
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...