Guest Posted January 30, 2018 Share Posted January 30, 2018 السلام عليكم ورحمة الله تعالى وبركآته آللهم صلي وبارك على سيدنا محمد كما باركت على سيدنا ابراهيم اما بعد ايها الاخوة , سويت مود توزيع فلوس وضفت عليه جريد ليست آلحين انا حليت كل مشآكل في ديبق لكن لما شغلته ما جا شيء في ديبق !! ولما اضغط ع توزيع الكل او اعطاء للاعب محدد ميرضى مع اني مسوي ايديت بوكس ! Client - GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") GUIEditor.edit[1] = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, getPlayerName ( p), false, false ) end function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('systemGM',OpenWin) addEventHandler('OnClientGUIClick', root , function ( ) if ( source == aG ) then triggerServerEvent('giveall',LocalPlayer) elseif ( source == aP ) then triggerServerEvent('givep',LocalPlayer) end end ) - Server function Enviar (cantidad, name) givePlayerMoney(getRootElement(), tonumber(cantidad)) outputChatBox("#ff0000[Console] "..name..":#FFFFFF Has Been Give Money For All Players #AFAFAF$"..cantidad, getRootElement(), 255, 255, 255, true) end addEvent("giveall", true) addEventHandler("giveall", getRootElement(), Enviar) function Enviar (cantidad, name) givePlayerMoney(getRootElement(), tonumber(cantidad)) outputChatBox("#ffbb00[Console] "..name..":#FFFFFF Has Been Give Money For All Players #AFAFAF$"..cantidad, getRootElement(), 255, 255, 255, true) end addEvent("givep", true) addEventHandler("givep", getRootElement(), Enviar) -- والصلاة والسلام على افضل المرسلين ! Link to comment
#SycroX Posted January 30, 2018 Share Posted January 30, 2018 3 hours ago, #!MnT7r,_.<3 said: addEventHandler('OnClientGUIClick', root , function ( ) if ( source == aG ) then triggerServerEvent('giveall',LocalPlayer) elseif ( source == aP ) then triggerServerEvent('givep',LocalPlayer) end end ) وش ذا ؟؟ مسوي لما يضغط علي الزر يسوي تريجر للسيرفر علي طول ؟ طيب فين جلب محتوي الأديت بوكس ؟؟ و فين تحديد اللاعب من الجريد ليست ؟ Link to comment
Guest Posted January 30, 2018 Share Posted January 30, 2018 (edited) 2 hours ago, #SycroX said: وش ذا ؟؟ مسوي لما يضغط علي الزر يسوي تريجر للسيرفر علي طول ؟ طيب فين جلب محتوي الأديت بوكس ؟؟ و فين تحديد اللاعب من الجريد ليست ؟ محآولتي فيه : GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, getPlayerName ( p), false, false ) end function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('systemGM',OpenWin) addEventHandler('OnClientGUIClick', root , function ( ) if ( source == aG ) then local text = guiGetText(Edit) triggerServerEvent('giveall',LocalPlayer) elseif ( source == aP ) then local text = guiGetText(Edit) if ( guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ~= -1 ) then local Player = guiGridListGetItemText ( GUIEditor.gridlist[1] , guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ,1 ) triggerServerEvent ( 'givep' , localPlayer , Player ) end end end ) سيرفر مغيرت فيه شيء !! Edited January 30, 2018 by Guest Link to comment
Doffy Posted January 30, 2018 Share Posted January 30, 2018 (edited) try --Client GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, getPlayerName ( p), false, false ) end function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('systemGM',OpenWin) addEventHandler('OnClientGUIClick', root , function ( ) if ( source == aG ) then local aMoney = guiGetText(Edit) local name = getPlayerName(getLocalPlayer()) triggerServerEvent('giveall',localPlayer, aMoney, name) elseif ( source == aP ) then local money = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel ~= -1 then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1] , sel ,1 ) triggerServerEvent ( 'givep' , localPlayer , playerName, money ) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) --Server addEvent("givep",true) addEventHandler("givep",getRootElement(), function( playerName, money ) local plr = getPlayerFromName(playerName) givePlayerMoney(plr, money) outputChatBox("["..getPlayerName(source).."] has given you [ $"..money.." ]",plr,0,255,0,true) outputChatBox("* Done Given Player ( "..playerName.." ) Money : $"..money.."",source,0,255,0,true) end ) addEvent("giveall", true) addEventHandler("giveall",getRootElement(), function(aMoney,name) for i,v in ipairs(getElementsByType("player")) do givePlayerMoney (v,aMoney) end outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..name.."] قام اللاعب",v,0,255,0,true) playSoundFrontEnd(getRootElement(), 44) end) Edited January 30, 2018 by #Himoo 1 Link to comment
Guest Posted January 30, 2018 Share Posted January 30, 2018 2 hours ago, #Himoo said: try --Client GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, getPlayerName ( p), false, false ) end function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) guiSetInputEnabled(true) end end addCommandHandler('systemGM',OpenWin) addEventHandler('OnClientGUIClick', root , function ( ) if ( source == aG ) then local aMoney = guiGetText(Edit) local name = getPlayerName(getLocalPlayer()) triggerServerEvent('giveall',localPlayer, aMoney, name) elseif ( source == aP ) then local money = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel ~= -1 then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1] , sel ,1 ) triggerServerEvent ( 'givep' , localPlayer , playerName, money ) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) --Server addEvent("givep",true) addEventHandler("givep",getRootElement(), function( playerName, money ) local plr = getPlayerFromName(playerName) givePlayerMoney(plr, money) outputChatBox("["..getPlayerName(source).."] has given you [ $"..money.." ]",plr,0,255,0,true) outputChatBox("* Done Given Player ( "..playerName.." ) Money : $"..money.."",source,0,255,0,true) end ) addEvent("giveall", true) addEventHandler("giveall",getRootElement(), function(aMoney,name) for i,v in ipairs(getElementsByType("player")) do givePlayerMoney (v,aMoney) end outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..name.."] قام اللاعب",v,0,255,0,true) playSoundFrontEnd(getRootElement(), 44) end) تسلم ، + كودي الي فوق وش فيه الخطأ ابي اتعلم من خطئي Link to comment
Doffy Posted January 31, 2018 Share Posted January 31, 2018 لا مؤاخذة يعني كودك كله تخبيص ض1 Link to comment
Master_MTA Posted January 31, 2018 Share Posted January 31, 2018 6 minutes ago, #Himoo said: لا مؤاخذة يعني كودك كله تخبيص ض1 طب قولو الغلط Link to comment
Doffy Posted January 31, 2018 Share Posted January 31, 2018 1 minute ago, Master_MTA said: طب قولو الغلط قوله انت انا هروح اللعب ض1 مكسل اشرحله ف رحت اديته جاهز وخلاص Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 1 hour ago, #Himoo said: لا مؤاخذة يعني كودك كله تخبيص ض1 فشلتني ، ما زبط كودك ! Link to comment
Doffy Posted January 31, 2018 Share Posted January 31, 2018 وين الخطأ بالزبط ؟ شو يطلعلك بالدي بق ؟ Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 1 hour ago, #Himoo said: وين الخطأ بالزبط ؟ شو يطلعلك بالدي بق ؟ ميطلع شيء !! لكلام اصفر او احمر ، لما اضغط ع اي زر او اكتب ميصير شيء ! Link to comment
SycroX Posted January 31, 2018 Share Posted January 31, 2018 GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } ------ function loadPlayers() for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, getPlayerName(p), false, false) end end ------ addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) end ) addCommandHandler("systemGM", function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor.window[1])) loadPlayers() end ) addEventHandler("onClientGUIClick", root, function() if source == aG then local Amount = guiGetText(Edit) triggerServerEvent("MoneyAction", localPlayer, "GiveAll", {Amount}) elseif source == aP then local Amount = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel and sel ~= -1 then local playerName = guiGridListGetItemText(GUIEditor.gridlist[1] , sel, 1) triggerServerEvent("MoneyAction", localPlayer, "GivePlayer", {playerName, Amount}) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) addEvent("MoneyAction", true) addEventHandler("MoneyAction", root, function(event, data) if event == "GivePlayer" then local player = getPlayerFromName(data[1]) if player and isElement(player) then givePlayerMoney(player, tonumber(data[2])) outputChatBox("["..getPlayerName(source).."] has gived you [ $"..data[2].." ]", player, 0, 255, 0, true) outputChatBox("you've gived ( "..data[1].." ) Money : $"..data[2].."", source, 0, 255, 0, true) end elseif event == "GiveAll" then for _,player in ipairs(getElementsByType("player")) do givePlayerMoney(player, tonumber(data[1])) outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..getPlayerName(source).."] قام اللاعب", player, 0, 255, 0, true) playSoundFrontEnd(player, 44) end end end ) Link to comment
Doffy Posted January 31, 2018 Share Posted January 31, 2018 23 minutes ago, #x1AhMeD,-09 said: GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } ------ function loadPlayers() for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, getPlayerName(p), false, false) end end ------ addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) end ) addCommandHandler("systemGM", function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor.window[1])) loadPlayers() end ) addEventHandler("onClientGUIClick", root, function() if source == aG then local Amount = guiGetText(Edit) triggerServerEvent("MoneyAction", localPlayer, "GiveAll", {Amount}) elseif source == aP then local Amount = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel and sel ~= -1 then local playerName = guiGridListGetItemText(GUIEditor.gridlist[1] , sel, 1) triggerServerEvent("MoneyAction", localPlayer, "GivePlayer", {playerName, Amount}) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) addEvent("MoneyAction", true) addEventHandler("MoneyAction", root, function(event, data) if event == "GivePlayer" then local player = getPlayerFromName(data[1]) if player and isElement(player) then givePlayerMoney(player, tonumber(data[2])) outputChatBox("["..getPlayerName(source).."] has gived you [ $"..data[2].." ]", player, 0, 255, 0, true) outputChatBox("you've gived ( "..data[1].." ) Money : $"..data[2].."", source, 0, 255, 0, true) end elseif event == "GiveAll" then for _,player in ipairs(getElementsByType("player")) do givePlayerMoney(player, tonumber(data[1])) outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..getPlayerName(source).."] قام اللاعب", player, 0, 255, 0, true) playSoundFrontEnd(player, 44) end end end ) اولا ازاي tonumber ? اصلا قيمة الفلوس هتبقي ارقام ازاي بقا هتحولها رقم وهيا رقم اصلا Link to comment
SycroX Posted January 31, 2018 Share Posted January 31, 2018 (edited) Just now, #Himoo said: اولا ازاي tonumber ? اصلا قيمة الفلوس هتبقي ارقام ازاي بقا هتحولها رقم وهيا رقم اصلا شكلك اتعديت من ناس هيك ما بدي اقول اسماء و خلاص Returns Returns a string containing the requested element's text, or false if the gui element passed to the function is invalid. + بدون الحاجه لي مراجعه الويكي من اسم الفانكشن guiGetText تشوف كلمه Text Text دايما سترنج Edited January 31, 2018 by #x1AhMeD,-09 1 Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 1 hour ago, #x1AhMeD,-09 said: شكلك اتعديت من ناس هيك ما بدي اقول اسماء و خلاص Returns Returns a string containing the requested element's text, or false if the gui element passed to the function is invalid. + بدون الحاجه لي مراجعه الويكي من اسم الفانكشن guiGetText تشوف كلمه Text Text دايما سترنج آسف اذا ازعجتك بس انت حطيتلي كود اللاعبين فوق اللوحةة لما شغلته المود ما جاني اللاعبين وبعطيك صورة مافي لاعبين + اذا ضغطت ع اعطاء للكل وش يسوي :https://c.top4top.net/p_7617s8l21.png Link to comment
SycroX Posted January 31, 2018 Share Posted January 31, 2018 Just now, #!MnT7r,_.<3 said: آسف اذا ازعجتك بس انت حطيتلي كود اللاعبين فوق اللوحةة لما شغلته المود ما جاني اللاعبين وبعطيك صورة مافي لاعبين + اذا ضغطت ع اعطاء للكل وش يسوي :https://c.top4top.net/p_7617s8l21.png روح لفنكنش loadPlayers بعدين تشوف getPlayerName(p) بدلها خلها getPlayerName(player) Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 2 minutes ago, #x1AhMeD,-09 said: روح لفنكنش loadPlayers بعدين تشوف getPlayerName(p) بدلها خلها getPlayerName(player) ظهر لي اللاعبين لكل المشكلةة ما يبي يوزع للاعب او لـلكل Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 (edited) آرجو مساعدة@#Soking @!#NssoR_)@#Himoo Edited January 31, 2018 by Guest Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 1 minute ago, #Himoo said: شو يطلعلك بالدي بق ؟ https://c.top4top.net/p_7617s8l21.png Link to comment
Doffy Posted January 31, 2018 Share Posted January 31, 2018 GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } ------ function changeGridListItemToPlayersName( GridList, Column ) -- to 3NAD if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ) end end end end end ------ addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) end ) addCommandHandler("systemGM", function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor.window[1])) changeGridListItemToPlayersName(GUIEditor.gridlist[1], 1) end ) addEventHandler("onClientGUIClick", root, function() if source == aG then local Amount = guiGetText(Edit) triggerServerEvent("MoneyAction", localPlayer, "GiveAll", {Amount}) elseif source == aP then local Amount = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel and sel ~= -1 then local playerName = guiGridListGetItemText(GUIEditor.gridlist[1] , sel, 1) triggerServerEvent("MoneyAction", localPlayer, "GivePlayer", {playerName, Amount}) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 21 minutes ago, #Himoo said: GUIEditor = { gridlist = {}, window = {}, label = {}, edit = {} } ------function changeGridListItemToPlayersName( GridList, Column ) -- to 3NAD if GridList and Column then if getElementType ( GridList ) == "gui-gridlist" then if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ) end end end endend ------ addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(377, 203, 620, 434, ".:[ نظام توزيع الفلوس v2.5 | طرب تآيم ]:.", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(9, 63, 350, 348, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#اللاعبين", 0.9) aP = guiCreateButton(407, 253, 147, 41, "[ Give Player ]", false, GUIEditor.window[1]) guiSetProperty(aP, "NormalTextColour", "FFFD8300") aG = guiCreateButton(407, 162, 147, 41, "[ Give All ]", false, GUIEditor.window[1]) guiSetProperty(aG, "NormalTextColour", "FFEFFE00") Edit = guiCreateEdit(383, 387, 228, 29, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(512, 360, 67, 17, "* المبلغ : ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 220, 252) GUIEditor.label[2] = guiCreateLabel(28, 32, 182, 15, "Created By FaNaaN | 6rB Time ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-small") guiLabelSetColor(GUIEditor.label[2], 41, 251, 0) guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.label[3] = guiCreateLabel(383, 48, 187, 15, "مرحبا ً بك في لوحةة توزيع الفلوس !", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 248, 250) GUIEditor.label[4] = guiCreateLabel(383, 93, 187, 15, "قم بكتآبةة المبلغ في إيديت \"الفراغ\"", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 248, 250) end ) addCommandHandler("systemGM", function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor.window[1])) changeGridListItemToPlayersName(GUIEditor.gridlist[1], 1) end ) addEventHandler("onClientGUIClick", root, function() if source == aG then local Amount = guiGetText(Edit) triggerServerEvent("MoneyAction", localPlayer, "GiveAll", {Amount}) elseif source == aP then local Amount = guiGetText(Edit) local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if sel and sel ~= -1 then local playerName = guiGridListGetItemText(GUIEditor.gridlist[1] , sel, 1) triggerServerEvent("MoneyAction", localPlayer, "GivePlayer", {playerName, Amount}) else outputChatBox("* Please select a player first",255,0,0,true) end end end ) مزبط المشكل زي صورة Link to comment
SycroX Posted January 31, 2018 Share Posted January 31, 2018 7 minutes ago, #!MnT7r,_.<3 said: https://c.top4top.net/p_7617s8l21.png وش دخل الدي بق الي بالصوره بي عدم التوزيع علي الكل , الدي بق الي بالصوره كان مشكلتو اني كنت كاتب فقط اسم المتغير غلط ما له اي علاقه بالتوزيع علي الكل انت متاكد انك ضايف ذا addEvent("MoneyAction", true) addEventHandler("MoneyAction", root, function(event, data) if event == "GivePlayer" then local player = getPlayerFromName(data[1]) if player and isElement(player) then givePlayerMoney(player, tonumber(data[2])) outputChatBox("["..getPlayerName(source).."] has gived you [ $"..data[2].." ]", player, 0, 255, 0, true) outputChatBox("you've gived ( "..data[1].." ) Money : $"..data[2].."", source, 0, 255, 0, true) end elseif event == "GiveAll" then for _,player in ipairs(getElementsByType("player")) do givePlayerMoney(player, tonumber(data[1])) outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..getPlayerName(source).."] قام اللاعب", player, 0, 255, 0, true) playSoundFrontEnd(player, 44) end end end ) للسيرفر سايد ؟؟ Link to comment
Guest Posted January 31, 2018 Share Posted January 31, 2018 Just now, #x1AhMeD,-09 said: وش دخل الدي بق الي بالصوره بي عدم التوزيع علي الكل , الدي بق الي بالصوره كان مشكلتو اني كنت كاتب فقط اسم المتغير غلط ما له اي علاقه بالتوزيع علي الكل انت متاكد انك ضايف ذا addEvent("MoneyAction", true)addEventHandler("MoneyAction", root, function(event, data) if event == "GivePlayer" then local player = getPlayerFromName(data[1]) if player and isElement(player) then givePlayerMoney(player, tonumber(data[2])) outputChatBox("["..getPlayerName(source).."] has gived you [ $"..data[2].." ]", player, 0, 255, 0, true) outputChatBox("you've gived ( "..data[1].." ) Money : $"..data[2].."", source, 0, 255, 0, true) end elseif event == "GiveAll" then for _,player in ipairs(getElementsByType("player")) do givePlayerMoney(player, tonumber(data[1])) outputChatBox("($"..aMoney..") بأعطاء جميع اللاعبين مبلغ ["..getPlayerName(source).."] قام اللاعب", player, 0, 255, 0, true) playSoundFrontEnd(player, 44) end end end) للسيرفر سايد ؟؟ آيه ! @DABL @iMr.WiFi..! Support Me 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