Jump to content

تعديل !!!


iMr.G[7]A

Recommended Posts

السلآم عليكم ابي تعديل ابي اكتب انا اسم السيآرة ~

مو يجيب لي اسم السيآرة الاصلي

الكلينت :

GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
cars = { 
    {598}, 
    {597}, 
    {596}, 
    {523}, 
    {599}, 
    {427}, 
  --{carID}, 
    } 
  
  
  
local l, w = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((l - 250) / 2, (w - 300) / 2, 215, 348, "Vehicle Q.9", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
guiSetProperty(GUIEditor.window[1], "NormalTextColour", "FF0000FE")   
  
GUIEditor.gridlist[1] = guiCreateGridList(9, 10, 197, 280, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.7) 
GUIEditor.button[1] = guiCreateButton(9, 301, 89, 37, "أختيآر", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "default-bold-small") 
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0000FE")   
GUIEditor.button[2] = guiCreateButton(118, 301, 88, 37, "X", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small") 
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FE")   
  
for i,v in ipairs (cars) do 
    local carName = getVehicleNameFromModel (v[1]) 
    local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."-", false, true) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, carName, false, true) 
end 
  
  
  
addEvent ("openMeanaaa", true) 
function openMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
end 
end 
addEventHandler ("openMeanaaa", getRootElement(), openMean) 
  
addEvent ("closeOpenMeanaaa", true) 
function closeOpenMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
end 
end 
addEventHandler ("closeOpenMeanaaa", getRootElement(), closeOpenMean) 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[2], 
function (button, state, absoluteX, absoluteYe) 
 guiSetVisible(GUIEditor.window[1],false) 
 showCursor(false) 
end) 
function trigger () 
if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then 
local car = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) 
if car == "" or car == nil then outputChatBox( "please selected car from list.",255,0,0,true ) return end 
  triggerServerEvent ("getCaraaa", getLocalPlayer(), car) 
  guiSetVisible(GUIEditor.window[1],false) 
  showCursor(false) 
end 
end 
addEventHandler ("onClientGUIClick", GUIEditor.button[1], 
function () 
trigger(getLocalPlayer()) 
end) 
  
addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], 
function () 
trigger(getLocalPlayer()) 
end) 
  

Edited by Guest
Link to comment
  
 GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
cars = { 
    {598,"Here"}, 
    {597,"Here"}, 
    {596,"Here"}, 
    {523,"Here"}, 
    {599,"Here"}, 
    {427,"Here"}, 
  --{carID}, 
    } 
  
  
  
local l, w = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((l - 250) / 2, (w - 300) / 2, 215, 348, "Vehicle Q.9", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
guiSetProperty(GUIEditor.window[1], "NormalTextColour", "FF0000FE")   
  
GUIEditor.gridlist[1] = guiCreateGridList(9, 10, 197, 280, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.7) 
GUIEditor.button[1] = guiCreateButton(9, 301, 89, 37, "أختيآر", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "default-bold-small") 
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0000FE")   
GUIEditor.button[2] = guiCreateButton(118, 301, 88, 37, "X", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small") 
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FE")   
  
for i,v in ipairs (cars) do 
    local carName = getVehicleNameFromModel (v[1]) 
    local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."-", false, true) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, v[2], false, true) 
end 
  
  
  
addEvent ("openMeanaaa", true) 
function openMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
end 
end 
addEventHandler ("openMeanaaa", getRootElement(), openMean) 
  
addEvent ("closeOpenMeanaaa", true) 
function closeOpenMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
end 
end 
addEventHandler ("closeOpenMeanaaa", getRootElement(), closeOpenMean) 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[2], 
function (button, state, absoluteX, absoluteYe) 
 guiSetVisible(GUIEditor.window[1],false) 
 showCursor(false) 
end) 
function trigger () 
if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then 
local car = guiGridListGetItemData (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) 
if car == "" or car == nil then outputChatBox( "please selected car from list.",255,0,0,true ) return end 
  triggerServerEvent ("getCaraaa", getLocalPlayer(), car) 
  guiSetVisible(GUIEditor.window[1],false) 
  showCursor(false) 
end 
end 
addEventHandler ("onClientGUIClick", GUIEditor.button[1], 
function () 
trigger(getLocalPlayer()) 
end) 
  
addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], 
function () 
trigger(getLocalPlayer()) 
end) 

تحط الاسم اللي تبيه Here مكان هذي الكلمة

cars = {

    {598,"Here"},

    {597,"Here"},

    {596,"Here"},

    {523,"Here"},

    {599,"Here"},

    {427,"Here"},

}

Link to comment

سيرفر وش احطه

addEvent ("getCaraaa", true) 
addEventHandler ("getCaraaa", getRootElement(), 
function(car) 
    if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] )  
    veh[source] = nil  
    end 
    local carID = getVehicleNameFromModel (car) 
    local x,y,z = getElementPosition(source) 
    local carName = getVehicleNameFromModel (carID) 
    veh[source] = createVehicle(carID, x,y-7,z ,0, 0,80) 
    setVehicleColor(veh[source], 255, 255, 255) 
    warpPedIntoVehicle(source, veh[source])     
end 
) 

Link to comment
  
 GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
cars = { 
    {598,"Here"}, 
    {597,"Here"}, 
    {596,"Here"}, 
    {523,"Here"}, 
    {599,"Here"}, 
    {427,"Here"}, 
  --{carID}, 
    } 
  
  
  
local l, w = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((l - 250) / 2, (w - 300) / 2, 215, 348, "Vehicle Q.9", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
guiSetProperty(GUIEditor.window[1], "NormalTextColour", "FF0000FE")   
  
GUIEditor.gridlist[1] = guiCreateGridList(9, 10, 197, 280, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.7) 
GUIEditor.button[1] = guiCreateButton(9, 301, 89, 37, "أختيآر", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "default-bold-small") 
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0000FE")   
GUIEditor.button[2] = guiCreateButton(118, 301, 88, 37, "X", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small") 
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FE")   
  
for i,v in ipairs (cars) do 
    local carName = getVehicleNameFromModel (v[1]) 
    local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."-", false, true) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, v[2], false, true) 
end 
  
  
  
addEvent ("openMeanaaa", true) 
function openMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
end 
end 
addEventHandler ("openMeanaaa", getRootElement(), openMean) 
  
addEvent ("closeOpenMeanaaa", true) 
function closeOpenMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
end 
end 
addEventHandler ("closeOpenMeanaaa", getRootElement(), closeOpenMean) 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[2], 
function (button, state, absoluteX, absoluteYe) 
 guiSetVisible(GUIEditor.window[1],false) 
 showCursor(false) 
end) 
function trigger () 
if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then 
local car = guiGridListGetItemData (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) 
if car == "" or car == nil then outputChatBox( "please selected car from list.",255,0,0,true ) return end 
  triggerServerEvent ("getCaraaa", getLocalPlayer(), car) 
  guiSetVisible(GUIEditor.window[1],false) 
  showCursor(false) 
end 
end 
addEventHandler ("onClientGUIClick", GUIEditor.button[1], 
function () 
trigger(getLocalPlayer()) 
end) 
  
addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], 
function () 
trigger(getLocalPlayer()) 
end) 

تحط الاسم اللي تبيه Here مكان هذي الكلمة

cars = {

    {598,"Here"},

    {597,"Here"},

    {596,"Here"},

    {523,"Here"},

    {599,"Here"},

    {427,"Here"},

}

local l, w = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((l - 250) / 2, (w - 300) / 2, 215, 348, "Vehicle Q.9", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
guiSetProperty(GUIEditor.window[1], "NormalTextColour", "FF0000FE")   
  
GUIEditor.gridlist[1] = guiCreateGridList(9, 10, 197, 280, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.7) 
GUIEditor.button[1] = guiCreateButton(9, 301, 89, 37, "أختيآر", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "default-bold-small") 
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0000FE")   
GUIEditor.button[2] = guiCreateButton(118, 301, 88, 37, "X", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small") 
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FE")   
  
for i,v in ipairs (cars) do 
    local carName = getVehicleNameFromModel (v[1]) 
    local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."-", false, true) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, v[2], false, true) 
    guiGridListSetItemData(GUIEditor.gridlist[1], row, 2, v[1]) 
end 
  
  
  
addEvent ("openMeanaaa", true) 
function openMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],true) 
showCursor(true) 
end 
end 
addEventHandler ("openMeanaaa", getRootElement(), openMean) 
  
addEvent ("closeOpenMeanaaa", true) 
function closeOpenMean () 
if (getLocalPlayer() == source) then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
end 
end 
addEventHandler ("closeOpenMeanaaa", getRootElement(), closeOpenMean) 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[2], 
function (button, state, absoluteX, absoluteYe) 
 guiSetVisible(GUIEditor.window[1],false) 
 showCursor(false) 
end) 
function trigger () 
if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) then 
local car = guiGridListGetItemData (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) 
if car == "" or car == nil then outputChatBox( "please selected car from list.",255,0,0,true ) return end 
  triggerServerEvent ("getCaraaa", getLocalPlayer(), car) 
  guiSetVisible(GUIEditor.window[1],false) 
  showCursor(false) 
end 
end 
addEventHandler ("onClientGUIClick", GUIEditor.button[1], 
function () 
trigger(getLocalPlayer()) 
end) 
  
addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], 
function () 
trigger(getLocalPlayer()) 
end) 

نآسي

    guiGridListSetItemData(GUIEditor.gridlist[1], row, 2, v[1]) 

Link to comment
سيرفر وش احطه
addEvent ("getCaraaa", true) 
addEventHandler ("getCaraaa", getRootElement(), 
function(car) 
    if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] )  
    veh[source] = nil  
    end 
    local carID = getVehicleNameFromModel (car) 
    local x,y,z = getElementPosition(source) 
    local carName = getVehicleNameFromModel (carID) 
    veh[source] = createVehicle(carID, x,y-7,z ,0, 0,80) 
    setVehicleColor(veh[source], 255, 255, 255) 
    warpPedIntoVehicle(source, veh[source])     
end 
) 

كذآ

  
veh = { } 
addEvent ("getCaraaa", true) 
addEventHandler ("getCaraaa", getRootElement(),  
function(car) 
    if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] )  
    veh[source] = nil  
    end 
    local x,y,z = getElementPosition(source) 
    veh[source] = createVehicle(car, x,y-7,z ,0, 0,80) 
    setVehicleColor(veh[source], 255, 255, 255) 
    warpPedIntoVehicle(source, veh[source])     
end 
) 

Link to comment

-- Client Side # 
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
cars = { 
    {'name', 598}, 
    {'name', 597}, 
    {'name', 596}, 
    {'name', 523}, 
    {'name', 599}, 
    {'name', 427}, 
  --{'carName', carID}, 
} 
  
  
  
local l, w = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((l - 250) / 2, (w - 300) / 2, 215, 348, "Vehicle Q.9", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible(GUIEditor.window[1],false) 
guiSetAlpha(GUIEditor.window[1], 1.00) 
guiSetProperty(GUIEditor.window[1], "NormalTextColour", "FF0000FE")   
  
GUIEditor.gridlist[1] = guiCreateGridList(9, 10, 197, 280, false, GUIEditor.window[1]) 
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) 
guiGridListAddColumn(GUIEditor.gridlist[1], "Vehicle", 0.7) 
GUIEditor.button[1] = guiCreateButton(9, 301, 89, 37, "أختيآر", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "default-bold-small") 
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0000FE")   
GUIEditor.button[2] = guiCreateButton(118, 301, 88, 37, "X", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small") 
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0000FE")   
  
for i,v in ipairs (cars) do 
    local row = guiGridListAddRow (GUIEditor.gridlist[1]) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, i.."-", false, true) 
    guiGridListSetItemText (GUIEditor.gridlist[1], row, 2, v[1], false, true) 
    guiGridListSetItemData ( GUIEditor.gridlist[1], row, 2, v[2] ) 
end 
  
  
  
addEvent ("openMeanaaa", true) 
function openMean () 
    guiSetVisible(GUIEditor.window[1],true) 
        showCursor(true) 
  
end 
addEventHandler ("openMeanaaa", getRootElement(), openMean) 
  
addEvent ("closeOpenMeanaaa", true) 
function closeOpenMean () 
    guiSetVisible(GUIEditor.window[1],false) 
        showCursor(false) 
end 
addEventHandler ("closeOpenMeanaaa", getRootElement(), closeOpenMean) 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[2], function () 
    guiSetVisible(GUIEditor.window[1],false) 
        showCursor(false) 
    end,false 
) 
  
function trigger () 
    if (guiGridListGetSelectedItem (GUIEditor.gridlist[1])) ~= -1 then 
        local car = guiGridListGetItemData (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 2) 
            triggerServerEvent ("getCaraaa", localPlayer, car) 
                guiSetVisible(GUIEditor.window[1],false) 
                    showCursor(false) 
            else 
                    outputChatBox( "please selected car from list.",255,0,0,true ) 
    end 
end 
  
addEventHandler ("onClientGUIClick", GUIEditor.button[1],   function () 
    trigger() 
    end,false 
) 
  
addEventHandler ("onClientGUIDoubleClick", GUIEditor.gridlist[1], function () 
    trigger() 
    end,false 
) 

-- Server Side # 
  
local vehicle = { } 
  
addEvent ("getCaraaa", true) 
addEventHandler ("getCaraaa", root, function(id) 
    if isElement( vehicle[source] ) then destroyElement( vehicle[source] ) vehicle[source] = nil end 
    local x,y,z = getElementPosition(source) 
    vehicle[source] = createVehicle(id, x,y-7,z ,0, 0,80) 
    setVehicleColor(vehicle[source], 255, 255, 255) 
    warpPedIntoVehicle(source, vehicle[source])     
    end 
) 
Link to comment
  • 6 months later...

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