Jump to content

طلب


Recommended Posts

function getMaps ( ) 
local Maps = { } 
for i,v in ipairs ( getResources ( ) ) do  
if ( getResourceInfo ( v , "type" ) == "map" ) then  
table.insert ( Maps , v ) 
end 
end 
return Maps  
end 
  
for _,v in ipairs ( getMaps ( ) ) do  
outputChatBox ( ""..getResourceName ( v ) , root ) 
end 

Link to comment
function getMaps ( ) 
local Maps = { } 
for i,v in ipairs ( getResources ( ) ) do  
if ( getResourceInfo ( v , "type" ) == "map" ) then  
table.insert ( Maps , v ) 
end 
end 
return Maps  
end 
  
for _,v in ipairs ( getMaps ( ) ) do  
outputChatBox ( ""..getResourceName ( v ) , root ) 
end 

كود هدا احطه في Server ?

function getMaps ( ) 
local Maps = { } 
for i,v in ipairs ( getResources ( ) ) do 
if ( getResourceInfo ( v , "type" ) == "map" ) then 
table.insert ( Maps , v ) 
end 
end 
return 

Link to comment

Client

function  OpenWin (getMaps) 
  
 guiSetVisible (GUIEditor.window[1] , true ) 
      
     showCursor(true)  
  
        for _,v in ipairs (getMaps) do------Error 
  
local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
     
    guiGridListSetItemText(UIEditor.gridlist[1] ,row,cow,getResourceName(v),false,false) 
         
        end 
         
         
        end 
         
        addEvent("SetMaps",true) 
         
        addEventHandler("SetMaps",root,OpenWin) 
  
        bindKey("F5", "down", OpenWin) 

server

    function getMaps ( ) 
local Maps = { } 
for i,v in ipairs ( getResources ( ) ) do 
if ( getResourceInfo ( getResourceFromName ( v ) , "type" ) == "map" ) then 
  
table.insert ( Maps , v ) 
triggerClientEvent("SetMaps",source,getMaps) 
end 
end 
return Maps 
end 

Link to comment

# Server :

function fetchMaps (  ) 
   local Maps_ = {   } 
   for k, v in ipairs( getResources (  ) ) do 
    if ( getResourceInfo( v, "type" ) == "map" )then 
         table.insert ( Maps_, getResourceInfo( v, "name" ) ) 
     end 
   end 
  return Maps_ 
end 
  
addEvent ("GetMaps", true) 
addEventHandler ("GetMaps", root, 
  function () 
    local Maps = fetchMaps () 
    triggerClientEvent (source, "addMaps_", source, Maps) 
  end 
) 

# Client :

addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function (maps) 
    guiGridListClear (ليست القريد) 
    for _,v in ipairs (maps) do 
      local row = guiGridListAddRow (ليست القريد) 
      guiGridListSetItemText (ليست القريد, row, 1, v, false, false) 
    end 
  end 
) 

By : ZA7F

Link to comment
# Server :
function fetchMaps (  ) 
   local Maps_ = {   } 
   for k, v in ipairs( getResources (  ) ) do 
    if ( getResourceInfo( v, "type" ) == "map" )then 
         table.insert ( Maps_, getResourceInfo( v, "name" ) ) 
     end 
   end 
  return Maps_ 
end 
  
addEvent ("GetMaps", true) 
addEventHandler ("GetMaps", root, 
  function () 
    local Maps = fetchMaps () 
    triggerClientEvent (source, "addMaps_", source, Maps) 
  end 
) 

# Client :

addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function (maps) 
    guiGridListClear (ليست القريد) 
    for _,v in ipairs (maps) do 
      local row = guiGridListAddRow (ليست القريد) 
      guiGridListSetItemText (ليست القريد, row, 1, v, false, false) 
    end 
  end 
) 

By : ZA7F

ما اشتغل

debugscript

p_1639l8o1.png

Link to comment

جرب

  
function fetchMaps (  ) 
   local Maps_ = {   } 
   for k, v in ipairs( getResources (  ) ) do 
    if ( getResourceInfo( v, "type" ) == "map" )then 
         table.insert ( Maps_, getResourceInfo( v, "name" ) ) 
     end 
   end 
  return Maps_ 
end 
  
addEvent ("GetMaps", true) 
addEventHandler ("GetMaps", root, 
  function () 
    local Maps = fetchMaps () 
    for _,v in ipairs ( Maps ) do  
    triggerClientEvent (source, "addMaps_", source, v) 
  end 
end 
) 
  

  
addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function ( v ) 
    guiGridListClear (ليست القريد) 
     local row = guiGridListAddRow (ليست القريد) 
      guiGridListSetItemText (ليست القريد, row, 1, v, false, false) 
  end 
) 
  

Link to comment
جرب
  
function fetchMaps (  ) 
   local Maps_ = {   } 
   for k, v in ipairs( getResources (  ) ) do 
    if ( getResourceInfo( v, "type" ) == "map" )then 
         table.insert ( Maps_, getResourceInfo( v, "name" ) ) 
     end 
   end 
  return Maps_ 
end 
  
addEvent ("GetMaps", true) 
addEventHandler ("GetMaps", root, 
  function () 
    local Maps = fetchMaps () 
    for _,v in ipairs ( Maps ) do  
    triggerClientEvent (source, "addMaps_", source, v) 
  end 
end 
) 
  

  
addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function ( v ) 
    guiGridListClear (ليست القريد) 
     local row = guiGridListAddRow (ليست القريد) 
      guiGridListSetItemText (ليست القريد, row, 1, v, false, false) 
  end 
) 
  

NOT WORK

Link to comment
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
        GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) 
   cow =      guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) 
        GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
    guiSetVisible( GUIEditor.window[1] ,false) 
     
  
  
function  OpenWin2(k) 
  
 guiSetVisible (GUIEditor.window[1] , true ) 
      
     showCursor(true)  
      
      
      
        guiGridListClear (GUIEditor.gridlist[1] ) 
      
   local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
  
 guiGridListSetItemText ( GUIEditor.gridlist[1] , row,cow,k, false, false) 
  
end 
        bindKey("F5", "down", OpenWin2) 
  

function fetchMaps (  ) 
   local Maps_ = {   } 
   for k, v in ipairs( getResources (  ) ) do 
    if ( getResourceInfo( v, "type" ) == "map" )then 
         table.insert ( Maps_, getResourceInfo( v, "name" ) ) 
     end 
   end 
  return Maps_ 
end 
  
addEvent ("GetMaps", true) 
addEventHandler ("GetMaps", root, 
  function   () 
    local Maps = getMaps () 
    for _,k in ipairs ( Maps ) do 
    triggerClientEvent (source, "addMaps_", source, k) 
  end 
end 
) 

Link to comment

جرب

  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
        GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) 
   cow =      guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) 
        GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
    guiSetVisible( GUIEditor.window[1] ,false) 
     
  
  
function  OpenWin2() 
  
 guiSetVisible (GUIEditor.window[1] , true ) 
      
     showCursor(true)  
end 
        bindKey("F5", "down", OpenWin2) 
  
addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function ( v ) 
    guiGridListClear ( GUIEditor.gridlist[1] ) 
     local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
      guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) 
  end 
) 
  

Link to comment
جرب
  
GUIEditor = { 
    gridlist = {}, 
    window = {}, 
    button = {} 
} 
  
        GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) 
   cow =      guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) 
        GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")     
  
    guiSetVisible( GUIEditor.window[1] ,false) 
     
  
  
function  OpenWin2() 
  
 guiSetVisible (GUIEditor.window[1] , true ) 
      
     showCursor(true)  
end 
        bindKey("F5", "down", OpenWin2) 
  
addEvent ("addMaps_", true) 
addEventHandler ("addMaps_", root, 
  function ( v ) 
    guiGridListClear ( GUIEditor.gridlist[1] ) 
     local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
      guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) 
  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...