Jump to content

محتاج مساعدهـ


xNKM51

Recommended Posts

بـسم ألله ألرحمن ألرحيم

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


أبي مساعدهـ 

 

 


GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}

        GUIEditor.window[1] = guiCreateWindow(558, 182, 264, 450, "::|[Vehicles]|::", false)

        guiWindowSetSizable(GUIEditor.window[1], false)

        guiSetAlpha(GUIEditor.window[1], 1.00)
        
        guiSetVisible( GUIEditor.window[1], false )
        
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0FB4EA")

        GUIEditor.gridlist[1] = guiCreateGridList(9, 24, 243, 367, false, GUIEditor.window[1])

        guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.1)

        guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicles", 0.83)

        GUIEditor.button[1] = guiCreateButton(9, 401, 112, 35, "Use", false, GUIEditor.window[1])

        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFEBD40D")

        GUIEditor.button[2] = guiCreateButton(140, 401, 112, 35, "Close", false, GUIEditor.window[1])

        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFDE1C77")    


local Markers = { -- الماركرات
    {3045.10132 ,2047.44727 ,23.59525},
    {3064.66455 ,2047.49512 ,23.59525},
    {3083.14307 ,2047.31677 ,23.59525},
    {3083.98706 ,2165.42358 ,23.59525},
    {3064.50220 ,2165.48853 ,23.59525},
    {3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
    local marker = createMarker ( M[1], M[2], M[3] -1 , "cylinder", 1.5, 155, 0, 0 )
end

wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(GUIEditor.window[1], true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == GUIEditor.button[2] ) then
            guiSetVisible( GUIEditor.window[1], false )
            showCursor( false )
        end
    end
)


أبي ألكود هذا  يطلع سيارات مثل حقت ألقروبات ألعصابه

 

 

, وابي طال عمركم مركر أنتقال

Edited by x[B-B]'#Mr:SrOrE',<3
Link to comment

تعديل شوي بـ ألوحه 

 

 



GUIEditor = {

 

    gridlist = {},

    window = {},

    button = {}

}


        Vehicles = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(Vehicles, false)
        guiSetVisible( Vehicles, false )
        guiSetProperty(Vehicles, "CaptionColour", "FF6FBC40")

        ID = guiCreateGridList(9, 22, 240, 322, false, Vehicles)
        guiGridListAddColumn(ID, "#", 0.3)
        guiGridListAddColumn(ID, "Vehicles", 0.3)
        guiGridListAddColumn(ID, "ID", 0.3)
        Use = guiCreateButton(14, 346, 98, 22, "Use", false, Vehicles)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, Vehicles)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
    {3045.10132 ,2047.44727 ,23.59525},
    {3064.66455 ,2047.49512 ,23.59525},
    {3083.14307 ,2047.31677 ,23.59525},
    {3083.98706 ,2165.42358 ,23.59525},
    {3064.50220 ,2165.48853 ,23.59525},
    {3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
    local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end

wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(Vehicles, true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( Vehicles, false )
            showCursor( false )
        end
    end
)


Link to comment
53 minutes ago, x[B-B]'#Mr:SrOrE',<3 said:

بـسم ألله ألرحمن ألرحيم

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


أبي مساعدهـ 

 

 


GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}

        GUIEditor.window[1] = guiCreateWindow(558, 182, 264, 450, "::|[Vehicles]|::", false)

        guiWindowSetSizable(GUIEditor.window[1], false)

        guiSetAlpha(GUIEditor.window[1], 1.00)
        
        guiSetVisible( GUIEditor.window[1], false )
        
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0FB4EA")

        GUIEditor.gridlist[1] = guiCreateGridList(9, 24, 243, 367, false, GUIEditor.window[1])

        guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.1)

        guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicles", 0.83)

        GUIEditor.button[1] = guiCreateButton(9, 401, 112, 35, "Use", false, GUIEditor.window[1])

        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFEBD40D")

        GUIEditor.button[2] = guiCreateButton(140, 401, 112, 35, "Close", false, GUIEditor.window[1])

        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFDE1C77")    


local Markers = { -- الماركرات
    {3045.10132 ,2047.44727 ,23.59525},
    {3064.66455 ,2047.49512 ,23.59525},
    {3083.14307 ,2047.31677 ,23.59525},
    {3083.98706 ,2165.42358 ,23.59525},
    {3064.50220 ,2165.48853 ,23.59525},
    {3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
    local marker = createMarker ( M[1], M[2], M[3] -1 , "cylinder", 1.5, 155, 0, 0 )
end

wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(GUIEditor.window[1], true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == GUIEditor.button[2] ) then
            guiSetVisible( GUIEditor.window[1], false )
            showCursor( false )
        end
    end
)


أبي ألكود هذا  يطلع سيارات مثل حقت ألقروبات ألعصابه

 

 

, وابي طال عمركم مركر أنتقال

اولا لازم تشوف موضوع نسور بخصوص طرح الاكواد

1- هتعمل تحقق ان اللاعب اختار سياره guiGridListGetItemText , guiGridListGetSelectedItem وتسوي تحديد للقريد وترايقر لصنع السيارة

وتسوي تحقق ان اللاعب في تيم انت محدده getPlayerTeam , getTeamName , getPlayerTeam

2- تحقق ان اللاعب الي لمس الماركر addEventHandler , getElementType

بعدين setElementPosition
 

 

Link to comment

 


GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}


        VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(VehiclesS, false)
        guiSetVisible( VehiclesS, false )
        guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")

        Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, VehiclesS)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
    {3045.10132 ,2047.44727 ,23.59525},
    {3064.66455 ,2047.49512 ,23.59525},
    {3083.14307 ,2047.31677 ,23.59525},
    {3083.98706 ,2165.42358 ,23.59525},
    {3064.50220 ,2165.48853 ,23.59525},
    {3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
    local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end

wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(VehiclesS, true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( VehiclesS, false )
            showCursor( false )
        end
    end
)

function createPlayerList ()
        -- Create the grid list
        playerList = guiCreateGridList(9, 22, 240, 322, false, VehiclesS)
        -- Create a players column in the list
        local column = guiGridListAddColumn(playerList, "#", 0.1)
        if ( column ) then         -- If the column has been created, fill it with players
                for id, playeritem in ipairs(getElementsByType("player")) do
                        local row = guiGridListAddRow ( playerList )
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )
                end
                addEventHandler ( "onClientGUIClick", playerList, click )
        end
end
addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList )

function click ( button, state, sx, sy, x, y, z, elem, gui )
        -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list
        if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then
                -- get the player name from the selected row, first column 
                local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 )
                outputChatBox ( playerName )     -- output it to chat box
        end
end


function clientsideResourceStart ()
        --Create Use on the gridlist
        local Use = guiGridListAddColumn(playerList, "Vehicles", 0.6)
        --Add 2 rows to the grid list
        rowA = guiGridListAddRow ( playerList )
        rowB = guiGridListAddRow ( playerList )
        --Create the text "Hello" for rowA, Use
        guiGridListSetItemText ( playerList, rowA, Use, "429", false, false )       
        --Create the text "World!" for rowB, Use
        guiGridListSetItemText ( playerList, rowB, Use, "429", false, false )
        --Choose randomly which grid list item text to retrieve
        getRandomItem = math.random ( 1, 2 )       
        if getRandomItem == 1 then 
                randomItemData = guiGridListGetItemText ( playerList, rowA, Use )
        elseif getRandomItem == 2 then
                randomItemData = guiGridListGetItemText ( playerList, rowB, Use )
        end
        --Output the randomly retrieved item text
        outputChatBox ( "My gridlist item text: "..randomItemData ) 
end
addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )

 

 

 

يخي كيف أول أثنين جننوني أحول فيهم ساعه ,,,,, وش ألحل

أبي تساعدني أول كودين لآن تو م تعلمت زين ألبرمجه أبي أتعلم

 

GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}


        VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(VehiclesS, false)
        guiSetVisible( VehiclesS, false )
        guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")

        Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, VehiclesS)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
	{3045.10132 ,2047.44727 ,23.59525},
	{3064.66455 ,2047.49512 ,23.59525},
	{3083.14307 ,2047.31677 ,23.59525},
	{3083.98706 ,2165.42358 ,23.59525},
	{3064.50220 ,2165.48853 ,23.59525},
	{3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end



wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(VehiclesS, true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( VehiclesS, false )
            showCursor( false )
        end
    end
)



function createPlayerList ()
        -- Create the grid list
        playerList = guiCreateGridList(9, 22, 240, 322, false, VehiclesS)
        -- Create a players column in the list
        local column = guiGridListAddColumn(playerList, "#", 0.1)
        if ( column ) then         -- If the column has been created, fill it with players
                for id, playeritem in ipairs(getElementsByType("player")) do
                        local row = guiGridListAddRow ( playerList )
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )
                end
                addEventHandler ( "onClientGUIClick", playerList, click )
        end
end
addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList )

function click ( button, state, sx, sy, x, y, z, elem, gui )
        -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list
        if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then
                -- get the player name from the selected row, first column 
                local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 )
                outputChatBox ( playerName )     -- output it to chat box
        end
end




function clientsideResourceStart ()
    	--Create Use on the gridlist
		local Use = guiGridListAddColumn(playerList, "Vehicles", 0.6)
    	--Add 2 rows to the grid list
		rowA = guiGridListAddRow ( playerList )
    	rowB = guiGridListAddRow ( playerList )
        --Create the text "Hello" for rowA, Use
		guiGridListSetItemText ( playerList, rowA, Use, "429", false, false )   	
    	--Create the text "World!" for rowB, Use
		guiGridListSetItemText ( playerList, rowB, Use, "429", false, false )
    	--Choose randomly which grid list item text to retrieve
        getRandomItem = math.random ( 1, 2 )       
		if getRandomItem == 1 then 
                randomItemData = guiGridListGetItemText ( playerList, rowA, Use )
        elseif getRandomItem == 2 then
                randomItemData = guiGridListGetItemText ( playerList, rowB, Use )
        end
        --Output the randomly retrieved item text
        outputChatBox ( "My gridlist item text: "..randomItemData ) 
end
addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )

 

Edited by x[B-B]'#Mr:SrOrE',<3
Link to comment

-- ألمركر ألسيارهـ


GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}


        VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(VehiclesS, false)
        guiSetVisible( VehiclesS, false )
        guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")

        Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, VehiclesS)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
	{3045.10132 ,2047.44727 ,23.59525},
	{3064.66455 ,2047.49512 ,23.59525},
	{3083.14307 ,2047.31677 ,23.59525},
	{3083.98706 ,2165.42358 ,23.59525},
	{3064.50220 ,2165.48853 ,23.59525},
	{3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end



wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(VehiclesS, true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( VehiclesS, false )
            showCursor( false )
        end
    end
)



function clientsideResourceStart ()
        local playerList = guiCreateGridList ( 9, 22, 240, 322, false, VehiclesS)
        local column = guiGridListAddColumn( playerList, "Player", 0.85 ) -- Create a 'players' column in the list
        if ( column ) then -- If the column was successfully created
                for id, playeritem in ipairs(getElementsByType("player")) do 
                --Loop through all the players, adding them to the table
                        local row = guiGridListAddRow ( playerList )
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )
                end
        end
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(), clientsideResourceStart )

سويت بـس يطلع أسمي , كيف أسوي جدول 


Vehicles = { 492 , 485} زي كذا ؟

Link to comment

مدري هذا عطوني

 


createBlip ( 3073,2106,31 , 23 )





GUIEditor = {

    gridlist = {},

    window = {},

    button = {}

}


        VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(VehiclesS, false)
        guiSetVisible( VehiclesS, false )
        guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")

        Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, VehiclesS)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
	{3045.10132 ,2047.44727 ,23.59525},
	{3064.66455 ,2047.49512 ,23.59525},
	{3083.14307 ,2047.31677 ,23.59525},
	{3083.98706 ,2165.42358 ,23.59525},
	{3064.50220 ,2165.48853 ,23.59525},
	{3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end




wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function(plr)
        if plr == localPlayer then
            guiSetVisible(VehiclesS, true)
            showCursor(true)
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( VehiclesS, false )
            showCursor( false )
        end
    end
)



function clientsideResourceStart ()
        local playerList = guiCreateGridList ( 9, 22, 240, 322, false, VehiclesS)
        local column = guiGridListAddColumn( playerList, "Player", 0.85 ) -- Create a 'players' column in the list
        if ( column ) then -- If the column was successfully created
                for id, playeritem in ipairs(getElementsByType("player")) do 
                --Loop through all the players, adding them to the table
                        local row = guiGridListAddRow ( playerList )
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false )
                end
        end
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(), clientsideResourceStart )



local PlayerCars = {}

cars = {
    {462},
	{422},
	{551},
	{463},
	{579},
	{494},
	{506},
	{522},
	{411},
	{487}-- طيارهـ
}

سويت بـس زي مت شايف أحول ~أغير ألجدول للعب يصير رقم 1؟؟؟ جنني ألكود

Link to comment
createBlip ( 3073,2106,31 , 23 )

cars = {
    {462},
	{422},
	{551},
	{463},
	{579},
	{494},
	{506},
	{522},
	{411},
	{487}-- طيارهـ
}

local Markers = { -- الماركرات
	{3045.10132 ,2047.44727 ,23.59525},
	{3064.66455 ,2047.49512 ,23.59525},
	{3083.14307 ,2047.31677 ,23.59525},
	{3083.98706 ,2165.42358 ,23.59525},
	{3064.50220 ,2165.48853 ,23.59525},
	{3047.02734 ,2165.67456 ,23.59525},
}

for i,M in ipairs(Markers) do
	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end

VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
guiWindowSetSizable(VehiclesS, false)
guiSetVisible( VehiclesS, false )
guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")
playerList = guiCreateGridList ( 9, 22, 240, 322, false, VehiclesS)
guiGridListAddColumn( playerList, "Vehicles", 0.85 )
Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
guiSetFont(Use, "default-bold-small")
guiSetProperty(Use, "NormalTextColour", "FF62977A")
Colos = guiCreateButton(147, 346, 98, 22, "Close", false, VehiclesS)
guiSetFont(Colos, "default-bold-small")
guiSetProperty(Colos, "NormalTextColour", "FFD14529") 
for i,v in ipairs ( cars ) do 
local row = guiGridListAddRow ( playerList ) ; 
guiGridListSetItemText ( playerList , row , 1 , getVehicleNameFromID ( v[1] ) , false , false )
end




addEventHandler("onClientMarkerHit", root,function(plr)
if plr == localPlayer then
guiSetVisible(VehiclesS, true)
showCursor(true)
end
end ) ;

addEventHandler("onClientGUIClick", root,function()
if ( source == Colos ) then
guiSetVisible( VehiclesS, false )
showCursor( false )
end
end ) ;

 

Link to comment

طيب راح أحول مثل ألاول

 

createBlip ( 3073,2106,31 , 23 )
cars = {
{ 415},
{ 541},
{ 411},
{ 560},
{ 506},
{ 451},
{ 480},
{ 579},
{ 545},
{ 431},
{ 400},
{ 536},
{ 603},
{ 475},
{ 568},
--
{ 581},
{ 521},
{ 522},
{ 461},
{ 468},
--
{ 469},
{ 487}
}
local Markers = { -- الماركرات
	{3045.10132 ,2047.44727 ,23.59525},
	{3064.66455 ,2047.49512 ,23.59525},
	{3083.14307 ,2047.31677 ,23.59525},
	{3083.98706 ,2165.42358 ,23.59525},
	{3064.50220 ,2165.48853 ,23.59525},
	{3047.02734 ,2165.67456 ,23.59525},
}
for i,M in ipairs(Markers) do
	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end
VehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
guiWindowSetSizable(VehiclesS, false)
guiSetVisible( VehiclesS, false )
guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")
playerList = guiCreateGridList ( 9, 22, 240, 322, false, VehiclesS)
guiGridListAddColumn( playerList, "Vehicles", 0.85 )
Colos = guiCreateButton(147, 346, 98, 22, "Close", false, VehiclesS)
guiSetFont(Colos, "default-bold-small")
guiSetProperty(Colos, "NormalTextColour", "FFD14529") 
for i,v in ipairs ( cars ) do 
local row = guiGridListAddRow ( playerList ) ; 
guiGridListSetItemText ( playerList , row , 1 , getVehicleNameFromID ( v[1] ) , false , false )
end
addEventHandler("onClientMarkerHit", root,function(plr)
if plr == localPlayer then
guiSetVisible(VehiclesS, true)
showCursor(true)
end
end ) ;
addEventHandler("onClientGUIClick", root,function()
if ( source == Colos ) then
guiSetVisible( VehiclesS, false )
showCursor( false )
end
end )












-- When client's resource starts, create the GUI
function Use( )
    -- Create our button
Use = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)
guiSetFont(Use, "default-bold-small")
guiSetProperty(Use, "NormalTextColour", "FF62977A")

    -- And attach our button to the outputEditBox function
    addEventHandler ( "onClientGUIClick", Use, outputEditBox, false )

    -- Create an edit box and define it as "editBox".
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true )
    guiEditSetMaxLength ( editBox, 230 ) -- The max chatbox text length is 128, so force this
end
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), Use )

-- Setup our function to output the message to the chatbox
function outputEditBox ( cars )
    if button == "left" then
        local text = guiGetText ( editBox )-- Get the text from the edit box
        outputChatBox ( text ) -- Output that text
    end
end

مهو زبط ,,, ؟ للحين عدلت بـس م فهمت أبي شرح عربي , لو سمحت

Link to comment
6 hours ago, x[B-B]'#Mr:SrOrE',<3 said:

طيب راح أحول مثل ألاول

 


createBlip ( 3073,2106,31 , 23 )cars = {{ 415},{ 541},{ 411},{ 560},{ 506},{ 451},{ 480},{ 579},{ 545},{ 431},{ 400},{ 536},{ 603},{ 475},{ 568},--{ 581},{ 521},{ 522},{ 461},{ 468},--{ 469},{ 487}}local Markers = { -- الماركرات	{3045.10132 ,2047.44727 ,23.59525},	{3064.66455 ,2047.49512 ,23.59525},	{3083.14307 ,2047.31677 ,23.59525},	{3083.98706 ,2165.42358 ,23.59525},	{3064.50220 ,2165.48853 ,23.59525},	{3047.02734 ,2165.67456 ,23.59525},}for i,M in ipairs(Markers) do	local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )endVehiclesS = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)guiWindowSetSizable(VehiclesS, false)guiSetVisible( VehiclesS, false )guiSetProperty(VehiclesS, "CaptionColour", "FF6FBC40")playerList = guiCreateGridList ( 9, 22, 240, 322, false, VehiclesS)guiGridListAddColumn( playerList, "Vehicles", 0.85 )Colos = guiCreateButton(147, 346, 98, 22, "Close", false, VehiclesS)guiSetFont(Colos, "default-bold-small")guiSetProperty(Colos, "NormalTextColour", "FFD14529") for i,v in ipairs ( cars ) do local row = guiGridListAddRow ( playerList ) ; guiGridListSetItemText ( playerList , row , 1 , getVehicleNameFromID ( v[1] ) , false , false )endaddEventHandler("onClientMarkerHit", root,function(plr)if plr == localPlayer thenguiSetVisible(VehiclesS, true)showCursor(true)endend ) ;addEventHandler("onClientGUIClick", root,function()if ( source == Colos ) thenguiSetVisible( VehiclesS, false )showCursor( false )endend )-- When client's resource starts, create the GUIfunction Use( )    -- Create our buttonUse = guiCreateButton(14, 346, 98, 22, "Use", false, VehiclesS)guiSetFont(Use, "default-bold-small")guiSetProperty(Use, "NormalTextColour", "FF62977A")    -- And attach our button to the outputEditBox function    addEventHandler ( "onClientGUIClick", Use, outputEditBox, false )    -- Create an edit box and define it as "editBox".    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true )    guiEditSetMaxLength ( editBox, 230 ) -- The max chatbox text length is 128, so force thisendaddEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), Use )-- Setup our function to output the message to the chatboxfunction outputEditBox ( cars )    if button == "left" then        local text = guiGetText ( editBox )-- Get the text from the edit box        outputChatBox ( text ) -- Output that text    endend

مهو زبط ,,, ؟ للحين عدلت بـس م فهمت أبي شرح عربي , لو سمحت

ما اشوفك كتبت حرف من الفنكشنات اللي اعطاهم لك ديفولت

.------

Link to comment
local vehicles = {
cars = {
tab = guiCreateTab("Cars", اسم اللوحة),
list = {-- سياراتك هنا وضيف مثل ما بدك 
{"Cheetah", 415},
{"Bullet", 541},
{"Infernus", 411},
{"Sultan", 560},
{"Turismo", 451},
}
}

وحطها بجريد ليست 

وبس 

Edited by iyaad
Link to comment

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

تفتحله لوحه ويضغط الزر ياخد منها سياره

 

ملف سيرفر

ves = {  }

addEvent("giveCar")
addEventHandler("giveCar", root,
	function( action, data )
		if ( action == "car" ) then
			if ( isElement ( ves[source] ) ) then destroyElement( ves[source] ) end
			local x, y, z = getElementPosition(source)
			ves[source] = createVehicle ( data['carID'], x, y, z )
			warpPedIntoVehicle( source, ves[source] )
			outputChatBox( "#AA0000 You Get [ ".. data['carName'] .." ] ! ", source, 0, 0, 0, true )
		end
	end
)

 

ملف كلنت

GUIEditor = {

 
    gridlist = {},

    window = {},

    button = {}

}


        Vehicles = guiCreateWindow(606, 221, 259, 378, "::[Vehicles]::", false)
        guiWindowSetSizable(Vehicles, false)
        guiSetVisible( Vehicles, false )
        guiSetProperty(Vehicles, "CaptionColour", "FF6FBC40")

        ID = guiCreateGridList(9, 22, 240, 322, false, Vehicles)
        guiGridListAddColumn(ID, "#", 0.3)
        guiGridListAddColumn(ID, "Vehicles", 0.3)
        guiGridListAddColumn(ID, "ID", 0.3)
        Use = guiCreateButton(14, 346, 98, 22, "Use", false, Vehicles)
        guiSetFont(Use, "default-bold-small")
        guiSetProperty(Use, "NormalTextColour", "FF62977A")
        Colos = guiCreateButton(147, 346, 98, 22, "Colos", false, Vehicles)
        guiSetFont(Colos, "default-bold-small")
        guiSetProperty(Colos, "NormalTextColour", "FFD14529") 


local Markers = { -- الماركرات
    {3045.10132 ,2047.44727 ,23.59525},
    {3064.66455 ,2047.49512 ,23.59525},
    {3083.14307 ,2047.31677 ,23.59525},
    {3083.98706 ,2165.42358 ,23.59525},
    {3064.50220 ,2165.48853 ,23.59525},
    {3047.02734 ,2165.67456 ,23.59525},
	
}

for i,M in ipairs(Markers) do
    local marker = createMarker ( M[1], M[2], M[3] -2 , "cylinder", 1.5, 0, 0, 255 , 35 )
end

wndroot = getResourceRootElement()

addEventHandler("onClientMarkerHit", root,
    function( plr )
        if plr == localPlayer then
            guiSetVisible( Vehicles, true )
            showCursor( true )
			refresh ()
        end
    end
)

addEventHandler("onClientGUIClick", wndroot,
    function()
        if ( source == Colos ) then
            guiSetVisible( Vehicles, false )
            showCursor( false )
        end
    end
)

vehicles = { -- Name / ID
	{"Car 1", 409 },
	{"Car 2", 415 },
}

function refresh ()
guiGridListClear( ID )
for i,v in ipairs ( vehicles ) do
local idRow = guiGridListAddRow ( ID )
guiGridListSetItemText( ID, idRow, 1, tostring ( v[1] ), false, false )
guiGridListSetItemData( ID, idRow, 1, { carName = v[1] ,carID = v[2] } )
end
end


addEventHandler("onClientGUIClick", wndroot,
	function()
	local selected = guiGridListGetSelectedItem( ID )
	local text = guiGridListGetItemText( ID, selected, 1 )
	local dataa = guiGridListGetItemData( ID, selected, 1 )
		if source == Use then
			if ( selected ~= -1 ) then
				triggerServerEvent( "giveCar", localPlayer, "car", dataa )
			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...