Jump to content

طلب تصحيح الكود


Recommended Posts

guiWindowSetSizable(window, false)

guiSetVisible (window,false)

guiSetAlpha(window, 1.00)

local gridlist = guiCreateGridList(33, 46, 256, 253, false, window)

guiGridListAddColumn(gridlist, "Car Group", 0.9)

local button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window)

guiSetProperty(button2, "NormalTextColour", "ffff0000")

local button = guiCreateButton(288, 25, 26, 22, "X", false, window)

guiSetProperty(button, "NormalTextColour", "FFFF0000")

local car = { 541,560 }

for _,vehicle in ipairs (car) do

local row = guiGridListAddRow ( gridlist )

guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false )

end

addEventHandler("onClientGUIClick",button2,

function ()

local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 )

if carxx == "" then return outputChatBox("car group Good",255, 0, 0,true) end

triggerServerEvent("carx",localPlayer,carxx)

guiSetVisible(window,false)

showCursor(false)

end,false

)

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

local car = createMarker ( 825.42285,-2084.40015,12.92344, "cylinder", 1.5, 255, 255, 255, 255 )

addEventHandler('onClientMarkerHit', car,

function ( hitPlayer )

if ( hitPlayer == localPlayer ) then

if ( getElementData(hitPlayer, "Group" ) == "Good" ) then

guiSetVisible ( window ,true )

showCursor( true )

guiSetInputEnabled(false)

end

end

end

)

addEventHandler( "onClientGUIClick", button ,

function ()

guiSetVisible(window,false)

showCursor(false,false)

end

)'> local window = guiCreateWindow(353, 146, 323, 358, "h-a-m-z-a", false)

guiWindowSetSizable(window, false)

guiSetVisible (window,false)

guiSetAlpha(window, 1.00)

local gridlist = guiCreateGridList(33, 46, 256, 253, false, window)

guiGridListAddColumn(gridlist, "Car Group", 0.9)

local button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window)

guiSetProperty(button2, "NormalTextColour", "ffff0000")

local button = guiCreateButton(288, 25, 26, 22, "X", false, window)

guiSetProperty(button, "NormalTextColour", "FFFF0000")

local car = { 541,560 }

for _,vehicle in ipairs (car) do

local row = guiGridListAddRow ( gridlist )

guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false )

end

addEventHandler("onClientGUIClick",button2,

function ()

local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 )

if carxx == "" then return outputChatBox("car group Good",255, 0, 0,true) end

triggerServerEvent("carx",localPlayer,carxx)

guiSetVisible(window,false)

showCursor(false)

end,false

)

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

local car = createMarker ( 825.42285,-2084.40015,12.92344, "cylinder", 1.5, 255, 255, 255, 255 )

addEventHandler('onClientMarkerHit', car,

function ( hitPlayer )

if ( hitPlayer == localPlayer ) then

if ( getElementData(hitPlayer, "Group" ) == "Good" ) then

guiSetVisible ( window ,true )

showCursor( true )

guiSetInputEnabled(false)

end

end

end

)

addEventHandler( "onClientGUIClick", button ,

function ()

guiSetVisible(window,false)

showCursor(false,false)

end

)

Link to comment
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

    local window = guiCreateWindow(353, 146, 323, 358, "h-a-m-z-a", false) 
    guiWindowSetSizable(window, false) 
    guiSetVisible (window,false) 
    guiSetAlpha(window, 1.00) 
      
    local gridlist = guiCreateGridList(33, 46, 256, 253, false, window) 
    guiGridListAddColumn(gridlist, "Car Group", 0.9) 
    local button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window) 
    guiSetProperty(button2, "NormalTextColour", "ffff0000") 
    local button = guiCreateButton(288, 25, 26, 22, "X", false, window) 
    guiSetProperty(button, "NormalTextColour", "FFFF0000")     
    local car = { 541,560 } 
      
    for _,vehicle in ipairs (car) do 
    local row = guiGridListAddRow ( gridlist ) 
    guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false ) 
    end 
      
    addEventHandler("onClientGUIClick",button2, 
    function () 
    local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) 
     if carxx == "" then return outputChatBox("car group Good",255, 0, 0,true) end 
    triggerServerEvent("carx",localPlayer,carxx) 
    guiSetVisible(window,false) 
    showCursor(false) 
    end,false 
    ) 
      
    ------------------------------- 
    local car = createMarker ( 825.42285,-2084.40015,12.92344, "cylinder", 1.5, 255, 255, 255, 255 ) 
    addEventHandler('onClientMarkerHit', car, 
    function ( hitPlayer ) 
          if ( hitPlayer == localPlayer ) then 
            if ( getElementData(hitPlayer, "Group" ) == "Good" ) then 
             guiSetVisible ( window ,true ) 
            showCursor( true ) 
          guiSetInputEnabled(false) 
         end 
      end 
    end 
    ) 
      
    addEventHandler( "onClientGUIClick", button , 
    function () 
        guiSetVisible(window,false) 
        showCursor(false,false) 
    end 
    ) 

Link to comment
  
window = guiCreateWindow(353, 146, 323, 358, "h-a-m-z-a", false) 
guiWindowSetSizable(window, false) 
guiSetVisible (window,false) 
guiSetAlpha(window, 1.00) 
gridlist = guiCreateGridList(33, 46, 256, 253, false, window) 
guiGridListAddColumn(gridlist, "Car Group", 0.9) 
button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window) 
guiSetProperty(button2, "NormalTextColour", "ffff0000") 
button = guiCreateButton(288, 25, 26, 22, "X", false, window) 
guiSetProperty(button, "NormalTextColour", "FFFF0000") 
local car = { 541,560 } 
  
for _,vehicle in ipairs (car) do 
local row = guiGridListAddRow ( gridlist ) 
guiGridListSetItemText ( gridlist, row, 1,getVehicleNameFromModel (tonumber( vehicle )), false, false ) 
end 
  
addEventHandler("onClientGUIClick",root, 
function () 
if ( source == button ) then 
guiSetVisible(window,false) 
showCursor(false) 
elseif ( source == button2 ) then 
local sel = guiGridListGetSelectedItem(gridlist) 
local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) 
if sel ~= -1 then 
triggerServerEvent("carx",localPlayer,carxx) 
guiSetVisible(window,false) 
showCursor(false) 
else 
outputChatBox("* Please Select Car",255,0,0,true) 
end 
end 
end) 
  
local car = createMarker ( 825.42285,-2084.40015,12.92344, "cylinder", 1.5, 255, 255, 255, 255 ) 
  
addEventHandler('onClientMarkerHit', car, 
function ( hitPlayer ) 
    if ( hitPlayer == localPlayer ) then 
    if ( getElementData(hitPlayer, "Group" ) == "Good" ) then 
    guiSetVisible ( window ,true ) 
    showCursor( true ) 
    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...