Jump to content

طلب


Recommended Posts

شباب ماركر ما يظهر

هذا كود

GUIEditor = { 
    gridlist = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetAlpha(wnd, 0.92) 
        guiSetProperty(wnd, "CaptionColour", "FF788D6B") 
  
        but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) 
        guiSetFont(but1, "default-small") 
        guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") 
        but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) 
        guiSetFont(but2, "default-small") 
        guiSetProperty(but2, "NormalTextColour", "FF24F508") 
        but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) 
        guiSetFont(but3, "default-small") 
        guiSetProperty(but3, "NormalTextColour", "FFF92603") 
        but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) 
        guiSetFont(but5, "default-small") 
        guiSetProperty(but5, "NormalTextColour", "FFC536C3") 
        but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) 
        guiSetFont(but6, "default-small") 
        guiSetProperty(but6, "NormalTextColour", "FF1909F1") 
        but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) 
        guiSetFont(but7, "default-small") 
        guiSetProperty(but7, "NormalTextColour", "FF05DBF4") 
        GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) 
        GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) 
        for i = 1, 4 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, Car| SOON", false, false) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false)     
    end 
) 
  
addEventHandler ( 'onClientGUIClick', resourceRoot, function( ) 
    if ( source == but1) then 
        triggerServerEvent ( 'car1', localPlayer ) 
    elseif ( source == but2) then 
        triggerServerEvent ( 'car2', localPlayer ) 
    elseif ( source == but3) then 
        triggerServerEvent ( 'car3', localPlayer ) 
    elseif ( source == but4) then 
        triggerServerEvent ( 'car4', localPlayer ) 
    elseif ( source == but5) then 
        triggerServerEvent ( 'car5', localPlayer ) 
    elseif ( source == but6) then 
        triggerServerEvent ( 'car6', localPlayer ) 
    elseif ( source == but7) then 
        triggerServerEvent ( 'car7', localPlayer ) 
        end 
    end 
) 
  
local markerD = createMarker(0,0,0,"cylinder", 4 ) 
addEventHandler('onClientMarkerHit',markerD,function (plr) 
    if plr == localPlayer then 
        guiSetVisible(wnd,true) 
        showCursor ( true ) 
        end 
    end 
) 
 

Link to comment

هذا سيرفر لو تبون

vehicle = {} 
  
  
addEvent( 'car1', true ) 
addEventHandler( 'car1', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 431, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car2', true ) 
addEventHandler( 'car2', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 432, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car3', true ) 
addEventHandler( 'car3', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 434, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car4', true ) 
addEventHandler( 'car4', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 421, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car5', true ) 
addEventHandler( 'car5', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 132, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car6', true ) 
addEventHandler( 'car6', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 232, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 
  
  
addEvent( 'car7', true ) 
addEventHandler( 'car7', root,function() 
    local x, y, z = getElementPosition ( source ) 
        if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
            vehicle[source] = createVehicle ( 442, x, y, z + 10 ) 
                outputChatBox ( "Car Spwan!", source) 
    end 
) 

Link to comment

في سيارة رقمها 132 :lol:

واكوادك نصها زايدة وشخابيط

Client Side

local markerD = createMarker(x,y,z,"cylinder", 4 ) 
 createBlipAttachedTo ( markerD, id ) 
  
  GUIEditor = { 
        gridlist = {}, 
        memo = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) 
            guiWindowSetSizable(wnd, false) 
            guiSetAlpha(wnd, 0.92) 
            guiSetProperty(wnd, "CaptionColour", "FF788D6B") 
      
            but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) 
            guiSetFont(but1, "default-small") 
            guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") 
            but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) 
            guiSetFont(but2, "default-small") 
            guiSetProperty(but2, "NormalTextColour", "FF24F508") 
            but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) 
            guiSetFont(but3, "default-small") 
            guiSetProperty(but3, "NormalTextColour", "FFF92603") 
            but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) 
            guiSetFont(but5, "default-small") 
            guiSetProperty(but5, "NormalTextColour", "FFC536C3") 
            but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) 
            guiSetFont(but6, "default-small") 
            guiSetProperty(but6, "NormalTextColour", "FF1909F1") 
            but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) 
            guiSetFont(but7, "default-small") 
            guiSetProperty(but7, "NormalTextColour", "FF05DBF4") 
            GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) 
            GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) 
            guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) 
            for i = 1, 4 do 
                guiGridListAddRow(GUIEditor.gridlist[1]) 
            end 
            guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) 
           guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false)     
       end) 
      
    addEventHandler ( 'onClientGUIClick', root, function( ) 
       if ( source == but1) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but2) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but3) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but4) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but5) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but6) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but7) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
           end 
       end) 
      
  
  
addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) 
  if hit == localPlayer then 
 guiSetVisible ( wnd, true ) 
 showCursor ( true ) 
  end 
end , false ) 

Server Side

vehicle = {} 
  
    addEvent( 'car', true ) 
    addEventHandler( 'car', root,function(id) 
        local x, y, z = getElementPosition ( source ) 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                vehicle[source] = createVehicle ( id, x, y, z + 10 ) 
                    outputChatBox ( "Car Spwan!", source) 
        end) 

Edited by Guest
Link to comment
في سيارة رقمها 132 :lol:

واكوادك نصها زايدة وشخابيط

Client Side

  
  local markerD = createMarker(x,y,z,"cylinder", 4 ) 
  createBlipAttachedTo ( markerD, id ) 
  
  GUIEditor = { 
        gridlist = {}, 
        memo = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) 
            guiWindowSetSizable(wnd, false) 
            guiSetAlpha(wnd, 0.92) 
            guiSetProperty(wnd, "CaptionColour", "FF788D6B") 
      
            but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) 
            guiSetFont(but1, "default-small") 
            guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") 
            but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) 
            guiSetFont(but2, "default-small") 
            guiSetProperty(but2, "NormalTextColour", "FF24F508") 
            but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) 
            guiSetFont(but3, "default-small") 
            guiSetProperty(but3, "NormalTextColour", "FFF92603") 
            but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) 
            guiSetFont(but5, "default-small") 
            guiSetProperty(but5, "NormalTextColour", "FFC536C3") 
            but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) 
            guiSetFont(but6, "default-small") 
            guiSetProperty(but6, "NormalTextColour", "FF1909F1") 
            but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) 
            guiSetFont(but7, "default-small") 
            guiSetProperty(but7, "NormalTextColour", "FF05DBF4") 
            GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) 
            GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) 
            guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) 
            for i = 1, 4 do 
                guiGridListAddRow(GUIEditor.gridlist[1]) 
            end 
            guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) 
           guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false)     
       end 
    ) 
      
    addEventHandler ( 'onClientGUIClick', root, function( ) 
       if ( source == but1) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but2) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but3) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but4) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but5) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but6) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but7) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
           end 
       end 
    ) 
      
  
  
addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) 
  if hit == localPlayer then 
 guiSetVisible ( wnd, true ) 
 showCursor ( true ) 
  end 
end , false ) 
  
  

Server Side

  
    vehicle = {} 
  
    addEvent( 'car', true ) 
    addEventHandler( 'car', root,function(id) 
        local x, y, z = getElementPosition ( source ) 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                vehicle[source] = createVehicle ( id, x, y, z + 10 ) 
                    outputChatBox ( "Car Spwan!", source) 
        end 
    ) 

وين لون الماركر

Link to comment
في سيارة رقمها 132 :lol:

واكوادك نصها زايدة وشخابيط

Client Side

  
  local markerD = createMarker(x,y,z,"cylinder", 4 ) 
  createBlipAttachedTo ( markerD, id ) 
  
  GUIEditor = { 
        gridlist = {}, 
        memo = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) 
            guiWindowSetSizable(wnd, false) 
            guiSetAlpha(wnd, 0.92) 
            guiSetProperty(wnd, "CaptionColour", "FF788D6B") 
      
            but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) 
            guiSetFont(but1, "default-small") 
            guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") 
            but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) 
            guiSetFont(but2, "default-small") 
            guiSetProperty(but2, "NormalTextColour", "FF24F508") 
            but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) 
            guiSetFont(but3, "default-small") 
            guiSetProperty(but3, "NormalTextColour", "FFF92603") 
            but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) 
            guiSetFont(but5, "default-small") 
            guiSetProperty(but5, "NormalTextColour", "FFC536C3") 
            but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) 
            guiSetFont(but6, "default-small") 
            guiSetProperty(but6, "NormalTextColour", "FF1909F1") 
            but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) 
            guiSetFont(but7, "default-small") 
            guiSetProperty(but7, "NormalTextColour", "FF05DBF4") 
            GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) 
            GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) 
            guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) 
            for i = 1, 4 do 
                guiGridListAddRow(GUIEditor.gridlist[1]) 
            end 
            guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) 
            guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) 
           guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false)     
       end 
    ) 
      
    addEventHandler ( 'onClientGUIClick', root, function( ) 
       if ( source == but1) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but2) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but3) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but4) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but5) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but6) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
       elseif ( source == but7) then 
           triggerServerEvent ( 'car', localPlayer, id ) 
           end 
       end 
    ) 
      
  
  
addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) 
  if hit == localPlayer then 
 guiSetVisible ( wnd, true ) 
 showCursor ( true ) 
  end 
end , false ) 
  
  

Server Side

  
    vehicle = {} 
  
    addEvent( 'car', true ) 
    addEventHandler( 'car', root,function(id) 
        local x, y, z = getElementPosition ( source ) 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                vehicle[source] = createVehicle ( id, x, y, z + 10 ) 
                    outputChatBox ( "Car Spwan!", source) 
        end 
    ) 

وين لون الماركر

لون الماركر والشفافيه ليس من الارقمنات المهمة واذ يبي لون و الشفافيه

يحط ذا الكود بدال كود الماركر حقه

local markerD = createMarker(x,y,z,"cylinder",4,r,g,b,alpha) 

لو تشوف الSyntax

هذا السيرفر

marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] ) 

الكلنت

marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) 

Link to comment
كيف اختصرته ؟

ممكن تقولي لي ابي اعرف

اول مره اشوف اختصار تريقر

لو تشوف الترايقر كلمة id

حط بداله اي دي السيارة

وتلاحظ كلمة id

addEventHandler( 'car', root,function(id)

وتلاحظ هنا كلمة id

vehicle[source] = createVehicle ( id, x, y, z + 10 )

بس مدري كيف اشرح لك عارف شرحي :shock:

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