Jump to content

طلب كود


Recommended Posts

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

شباب بدى كود بوضحلكم اياه

سويت لوحة فيها زر لما ادوس على الزر يظهرلى لوحة ثانية فيها اديت بوكس و زر

بدى لما اكتب فى الاديت بوكس ذه رقم و اضغط على الزر يعطلى للاعب لفل

Link to comment
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SetLevel ) then 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
guiGetText(edit.gv) 
setElementData(localPlayer,"Level",getElementData(localPlayer,"Level") + amount(guiGridListGetItemText(pList ,sel,1))) 
end 
end,false) 

ممكن تعديل الكود ؟ ^

Link to comment
#Client 
  
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SetLevel ) then 
   local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) 
      
     local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) 
      
     
           
local amount = guiGetText(edit.gv) 
  
triggerServerEvent(localPlayer,"setLevel",localPlayer,text,amount) 
  
  
end 
end 
) 
  
  
--#Server 
function set  (text,amount) 
local player = getPlayerFromName(text) 
         
    if ( player ) then 
  
setElementData(Player,"Level",getElementData(Player,"Level") + amount  ) 
  
end 
  
end 
  
end 
  
addEvent("setLevel",true) 
  
addEventHandler("setLevel",root,set) 
  

Edited by Guest
Link to comment
^

هريس

+ اطرح اكوادك كاملة ي صاحب الموضوع

  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
wnd = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)        
    end 
) 
  
--------------------------------------------------------------------------------------------------------------------------- 
  
edit = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)         
    end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
bindKey ("n","down", 
function () 
triggerServerEvent ("checkMido",localPlayer) 
end) 
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
showCursor(guiGetVisible(wnd.give)) 
guiSetInputEnabled (guiGetVisible(wnd.give)) 
  
end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(SetLevelWnd,true) 
guiSetVisible(wnd.give,false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[1] ) then 
guiSetVisible(wnd.give,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SLClose ) then 
guiSetVisible(SetLevelWnd,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
function update () 
guiGridListClear(pList) 
for i,v in ipairs (getElementsByType("player")) do 
local rp = guiGridListAddRow (pList) 
guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
end 
end 
addEventHandler ("onClientResourceStart",resourceRoot,update) 
addEventHandler ("onClientPlayerJoin",root,update) 
addEventHandler ("onClientPlayerChangeNick",root,update) 
addEventHandler ("onClientPlayerQuit",root,update) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SetLevel ) then 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
guiGetText(edit.gv) 
setElementData(localPlayer,"Level",getElementData(localPlayer,"Level") + amount(guiGridListGetItemText(pList ,sel,1))) 
end 
end,false) 

Link to comment
^

هريس

+ اطرح اكوادك كاملة ي صاحب الموضوع

  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
wnd = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)        
    end 
) 
  
--------------------------------------------------------------------------------------------------------------------------- 
  
edit = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)         
    end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
bindKey ("n","down", 
function () 
triggerServerEvent ("checkMido",localPlayer) 
end) 
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
showCursor(guiGetVisible(wnd.give)) 
guiSetInputEnabled (guiGetVisible(wnd.give)) 
  
end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(SetLevelWnd,true) 
guiSetVisible(wnd.give,false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[1] ) then 
guiSetVisible(wnd.give,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SLClose ) then 
guiSetVisible(SetLevelWnd,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
function update () 
guiGridListClear(pList) 
for i,v in ipairs (getElementsByType("player")) do 
local rp = guiGridListAddRow (pList) 
guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
end 
end 
addEventHandler ("onClientResourceStart",resourceRoot,update) 
addEventHandler ("onClientPlayerJoin",root,update) 
addEventHandler ("onClientPlayerChangeNick",root,update) 
addEventHandler ("onClientPlayerQuit",root,update) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SetLevel ) then 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
guiGetText(edit.gv) 
setElementData(localPlayer,"Level",getElementData(localPlayer,"Level") + amount(guiGridListGetItemText(pList ,sel,1))) 
end 
end,false) 

جرب

  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
wnd = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
    end 
) 
  
--------------------------------------------------------------------------------------------------------------------------- 
  
edit = {} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)        
    end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
bindKey ("n","down", 
function () 
triggerServerEvent ("checkMido",localPlayer) 
end) 
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
showCursor(guiGetVisible(wnd.give)) 
guiSetInputEnabled (guiGetVisible(wnd.give)) 
  
end 
) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[2] ) then 
guiSetVisible(SetLevelWnd,true) 
guiSetVisible(wnd.give,false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == GUIEditor.button[1] ) then 
guiSetVisible(wnd.give,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == SLClose ) then 
guiSetVisible(SetLevelWnd,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end 
end 
 ) 
---------------------------------------------------------------------------------------------------------------------------- 
function update () 
guiGridListClear(pList) 
for i,v in ipairs (getElementsByType("player")) do 
local rp = guiGridListAddRow (pList) 
guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
end 
end 
addEventHandler ("onClientResourceStart",resourceRoot,update) 
addEventHandler ("onClientPlayerJoin",root,update) 
addEventHandler ("onClientPlayerChangeNick",root,update) 
addEventHandler ("onClientPlayerQuit",root,update) 
---------------------------------------------------------------------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot,  
function ( ) 
if ( source == SetLevel ) then 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
guiGetText(edit.gv) 
setElementData(localPlayer,"Level",getElementData(localPlayer,"Level" + edit.gv) (guiGridListGetItemText(pList ,sel,1))) 
end 
end 
end 
) 

Link to comment
  
local screenW, screenH = guiGetScreenSize() 
  
wnd  = { } 
edit = { } 
  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
   
  
  
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)       
  
bindKey ("n","down", function () triggerServerEvent ("checkMido",localPlayer) end ) 
  
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
    guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
        showCursor(guiGetVisible(wnd.give)) 
            guiSetInputEnabled (guiGetVisible(wnd.give)) 
end ) 
  
addEventHandler("onClientGUIClick",root,  
function ( ) 
if ( source == SLClose ) then 
        guiSetVisible(SetLevelWnd,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
elseif ( source == GUIEditor.button[1] ) 
        guiSetVisible(wnd.give,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
elseif ( source == GUIEditor.button[2] ) 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
            end 
    end ) 
     
function Up ( ) 
    for i,v in ipairs (getElementsByType("player")) do 
        local rp = guiGridListAddRow (pList) 
           guiGridListClear(pList) 
               guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
            end 
    end 
addEventHandler ("onClientResourceStart",resourceRoot,Up) 
addEventHandler ("onClientPlayerJoin",getRootElement( ),Up) 
addEventHandler ("onClientPlayerChangeNick",getRootElement( ),Up) 
addEventHandler ("onClientPlayerQuit",getRootElement( ),Up) 
  
  

Link to comment
  
local screenW, screenH = guiGetScreenSize() 
  
wnd  = { } 
edit = { } 
  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
  
  
  
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)       
  
bindKey ("n","down", function () triggerServerEvent ("checkMido",localPlayer) end ) 
  
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
    guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
        showCursor(guiGetVisible(wnd.give)) 
            guiSetInputEnabled (guiGetVisible(wnd.give)) 
end ) 
  
addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SLClose ) then 
        guiSetVisible(SetLevelWnd,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[1] ) then 
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] ) then 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
            end 
    end ) 
    
function Up ( ) 
    for i,v in ipairs (getElementsByType("player")) do 
        local rp = guiGridListAddRow (pList) 
           guiGridListClear(pList) 
               guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
            end 
    end 
addEventHandler ("onClientResourceStart",resourceRoot,Up) 
addEventHandler ("onClientPlayerJoin",getRootElement( ),Up) 
addEventHandler ("onClientPlayerChangeNick",getRootElement( ),Up) 
addEventHandler ("onClientPlayerQuit",getRootElement( ),Up) 
  
  

Link to comment
  
local screenW, screenH = guiGetScreenSize() 
  
wnd  = { } 
edit = { } 
  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
  
  
  
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)       
  
bindKey ("n","down", function () triggerServerEvent ("checkMido",localPlayer) end ) 
  
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
    guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
        showCursor(guiGetVisible(wnd.give)) 
            guiSetInputEnabled (guiGetVisible(wnd.give)) 
end ) 
  
addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SLClose ) then 
        guiSetVisible(SetLevelWnd,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[1] ) then 
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] ) then 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
            end 
    end ) 
    
function Up ( ) 
    for i,v in ipairs (getElementsByType("player")) do 
        local rp = guiGridListAddRow (pList) 
           guiGridListClear(pList) 
               guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
            end 
    end 
addEventHandler ("onClientResourceStart",resourceRoot,Up) 
addEventHandler ("onClientPlayerJoin",getRootElement( ),Up) 
addEventHandler ("onClientPlayerChangeNick",getRootElement( ),Up) 
addEventHandler ("onClientPlayerQuit",getRootElement( ),Up) 
  
  

  
local screenW, screenH = guiGetScreenSize() 
  
wnd  = { } 
edit = { } 
  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
   
  
  
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)       
  
bindKey ("n","down", function () triggerServerEvent ("checkMido",localPlayer) end ) 
  
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
    guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
        showCursor(guiGetVisible(wnd.give)) 
            guiSetInputEnabled (guiGetVisible(wnd.give)) 
end ) 
  
addEventHandler("onClientGUIClick",root,  
function ( ) 
if ( source == SLClose ) then 
        guiSetVisible(SetLevelWnd,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
elseif ( source == GUIEditor.button[1] ) 
        guiSetVisible(wnd.give,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                 
elseif ( source == GUIEditor.button[2] ) 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
            end 
    end ) 
     
function Up ( ) 
    for i,v in ipairs (getElementsByType("player")) do 
        local rp = guiGridListAddRow (pList) 
           guiGridListClear(pList) 
               guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
            end 
    end 
addEventHandler ("onClientResourceStart",resourceRoot,Up) 
addEventHandler ("onClientPlayerJoin",getRootElement( ),Up) 
addEventHandler ("onClientPlayerChangeNick",getRootElement( ),Up) 
addEventHandler ("onClientPlayerQuit",getRootElement( ),Up) 
  
  

الحين انت قلي وش الفرق ي

@ٍSaedAmer

:redhotevil::roll::x:(

Link to comment
  
elseif ( source == GUIEditor.button[1] ) then 
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] ) then 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
  

  
elseif ( source == GUIEditor.button[1] )  
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] )  
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  

الحين انت قلي وش الفرق ي

@ٍSaedAmer

:redhotevil::roll::x:(

عرفت وش الفرق ؟؟

Link to comment
  
elseif ( source == GUIEditor.button[1] ) then 
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] ) then 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
  

  
elseif ( source == GUIEditor.button[1] )  
        guiSetVisible(wnd.give,false)  
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] )  
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  

الحين انت قلي وش الفرق ي

@ٍSaedAmer

:redhotevil::roll::x:(

عرفت وش الفرق ؟؟

ما نجحوا الكودين

الكود الاول ما يخلى اللوحة تفتح اصلاً

الكود الثانى يخلى اللاعبين ما يظهروا باللوحة

Link to comment
طب مهو انا اول مرة اسوى موضوع اللفل ذه

و ما افهم فيه

  
local screenW, screenH = guiGetScreenSize() 
  
wnd  = { } 
edit = { } 
  
GUIEditor = { 
    button = {}, 
    label = {} 
} 
        wnd.give = guiCreateWindow((screenW - 373) / 2, (screenH - 189) / 2, 373, 189, "~# Give Level #~", false) 
        guiWindowSetSizable(wnd.give, false) 
        guiSetAlpha(wnd.give, 1.00) 
  
        pList = guiCreateGridList(10, 22, 146, 157, false, wnd.give) 
        guiGridListAddColumn(pList, "# Player Name", 0.9) 
        GUIEditor.button[1] = guiCreateButton(251, 152, 112, 27, "~# Close #~", false, wnd.give) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.label[1] = guiCreateLabel(161, 28, 202, 15, "Player Level :", false, wnd.give) 
        GUIEditor.button[2] = guiCreateButton(163, 54, 88, 24, "Set Level", false, wnd.give) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(161, 83, 196, 30, "#Arabic", false, wnd.give) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(161, 118, 196, 30, "#English", false, wnd.give) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(wnd.give,false)       
  
  
  
        SetLevelWnd = guiCreateWindow((screenW - 286) / 2, (screenH - 134) / 2, 286, 134, "# Set Level", false) 
        guiWindowSetSizable(SetLevelWnd, false) 
        guiSetAlpha(SetLevelWnd, 1.00) 
  
        edit.gv = guiCreateEdit(11, 37, 265, 33, "", false, SetLevelWnd) 
        guiEditSetMaxLength(edit.gv, 65535) 
        SetLevel = guiCreateButton(23, 87, 94, 32, "Set Level", false, SetLevelWnd) 
        guiSetProperty(SetLevel, "NormalTextColour", "FFAAAAAA") 
        SLClose = guiCreateButton(166, 87, 94, 32, "Close", false, SetLevelWnd) 
        guiSetProperty(SLClose, "NormalTextColour", "FFAAAAAA")   
        guiSetVisible(SetLevelWnd,false)       
  
bindKey ("n","down", function () triggerServerEvent ("checkMido",localPlayer) end ) 
  
addEvent ("mIDO",true) 
addEventHandler ("mIDO",root, 
function () 
    guiSetVisible(wnd.give,not guiGetVisible(wnd.give)) 
        showCursor(guiGetVisible(wnd.give)) 
            guiSetInputEnabled (guiGetVisible(wnd.give)) 
end ) 
  
addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == SLClose ) then 
        guiSetVisible(SetLevelWnd,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[1] ) then 
        guiSetVisible(wnd.give,false) 
            showCursor(false) 
                guiSetInputEnabled(false) 
                
elseif ( source == GUIEditor.button[2] ) then 
        guiSetVisible(SetLevelWnd,true) 
            guiSetVisible(wnd.give,false) 
                guiSetInputEnabled(false) 
  
            end 
    end ) 
    
function Up ( ) 
    guiGridListClear(pList) 
    for i,v in ipairs (getElementsByType("player")) do 
        local rp = guiGridListAddRow (pList) 
               guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
            end 
    end 
addEventHandler ("onClientResourceStart",resourceRoot,Up) 
addEventHandler ("onClientPlayerJoin",getRootElement( ),Up) 
addEventHandler ("onClientPlayerChangeNick",getRootElement( ),Up) 
addEventHandler ("onClientPlayerQuit",getRootElement( ),Up) 
  
  
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...