Maksoud Posted April 13, 2016 Share Posted April 13, 2016 السلام عليكم و رحمة الله و بركاته شباب بدى كود بوضحلكم اياه سويت لوحة فيها زر لما ادوس على الزر يظهرلى لوحة ثانية فيها اديت بوكس و زر بدى لما اكتب فى الاديت بوكس ذه رقم و اضغط على الزر يعطلى للاعب لفل Link to comment
#|_oskar_|# Posted April 13, 2016 Share Posted April 13, 2016 تجيب اللى تكتبه بالايديث guiGetText Link to comment
Maksoud Posted April 13, 2016 Author Share Posted April 13, 2016 بدى اعطاء اللفل كيف يتم و شرح الكود لو سمحت Link to comment
#|_oskar_|# Posted April 13, 2016 Share Posted April 13, 2016 بدى اعطاء اللفل كيف يتم و شرح الكود لو سمحت اللفل دا ؟ setPlayerWantedLevel Link to comment
Maksoud Posted April 13, 2016 Author Share Posted April 13, 2016 لفل زومبى مثل الساعات كذا Link to comment
Maksoud Posted April 13, 2016 Author Share Posted April 13, 2016 setElementData(player,"Level",getElementData(player,"Level") + amount) بدى الكود كامل هذا الاقصده ^ Link to comment
Maksoud Posted April 13, 2016 Author Share Posted April 13, 2016 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
Ahmed Ly Posted April 14, 2016 Share Posted April 14, 2016 (edited) #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 April 14, 2016 by Guest Link to comment
Abdul KariM Posted April 14, 2016 Share Posted April 14, 2016 ^ هريس + اطرح اكوادك كاملة ي صاحب الموضوع Link to comment
Maksoud Posted April 18, 2016 Author Share Posted April 18, 2016 ^ هريس + اطرح اكوادك كاملة ي صاحب الموضوع 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
MR.GRAND Posted April 18, 2016 Share Posted April 18, 2016 ^ هريس + اطرح اكوادك كاملة ي صاحب الموضوع 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
#Soking Posted April 19, 2016 Share Posted April 19, 2016 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
SaedAmer Posted April 19, 2016 Share Posted April 19, 2016 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
iMr.WiFi..! Posted April 19, 2016 Share Posted April 19, 2016 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 Link to comment
SaedAmer Posted April 19, 2016 Share Posted April 19, 2016 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 عرفت وش الفرق ؟؟ Link to comment
Maksoud Posted April 19, 2016 Author Share Posted April 19, 2016 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 عرفت وش الفرق ؟؟ ما نجحوا الكودين الكود الاول ما يخلى اللوحة تفتح اصلاً الكود الثانى يخلى اللاعبين ما يظهروا باللوحة Link to comment
Maksoud Posted April 19, 2016 Author Share Posted April 19, 2016 يا شباب بدى المساعدة Link to comment
#Soking Posted April 19, 2016 Share Posted April 19, 2016 وش المختلف ؟ وش عدلت ؟ تراانت تدخل تنسخخخ , وتلصصق !!!!!! Link to comment
Maksoud Posted April 19, 2016 Author Share Posted April 19, 2016 طب مهو انا اول مرة اسوى موضوع اللفل ذه و ما افهم فيه Link to comment
MR.GRAND Posted April 19, 2016 Share Posted April 19, 2016 طب مهو انا اول مرة اسوى موضوع اللفل ذهو ما افهم فيه 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now