[KilleR] Posted May 23, 2016 Share Posted May 23, 2016 االسلام عليكم ورحمة الله وبركاته بدايتي فالبرمجه هه بالموضوع علطول سويت كود يجيب البلاير للقريد ليست جبته من الويكي وحاولت كثير ماظبط يصير كذا الكود function clientsideResourceStart () local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local column = guiGridListAddColumn( playerList, "اللاعبين", 0.85 ) if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart ) واسم القريد ليست حقي اللاعبين وانا اخاف امسح شي يصير خطا واول مره اجيب كود من الويكي ويصير صح Link to comment
Me[Z]oO Posted May 23, 2016 Share Posted May 23, 2016 الاكواد من الويكي م تفيدك !! هذه مجرد امثله وانت تفهم الارقمنتات Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) Link to comment
Me[Z]oO Posted May 23, 2016 Share Posted May 23, 2016 GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) --- if ( column ) then for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[2]) guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) end end --- GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 ظبط طيب سؤال ممكن رابط الويكي حق الي يرسل فلوس Link to comment
YourMind Posted May 23, 2016 Share Posted May 23, 2016 guiGridListGetSelectedItem guiGridListGetItemText guiGetText getPlayerFromName triggerServerEvent givePlayerMoney takePlayerMoney Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 اخوي يعني بس احطه ككذا ولا لازم كذا كود ياليت تسويه زين ----- واذا ضغط عالقريد ليست وكتب الرقم واضغطط الزر يتحول له Link to comment
YourMind Posted May 23, 2016 Share Posted May 23, 2016 addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox ("تم التحويل") end end) Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 local key = "F4" GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) --- if ( column ) then for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[2]) guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) end end --- GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) guiSetVisible (GUIEditor.window[1], false) bindKey( key, "down",function() guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end) addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox ("تم التحويل") end end) سويته بملف الكلنت وماظبط Link to comment
Adham Posted May 23, 2016 Share Posted May 23, 2016 addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox ("تم التحويل") end end) حطه سرفر وشيله من الكلنت Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 ماظبط كلنت local key = "F4" GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.gridlist[2] = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) --- if ( column ) then for i, p in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[2]) guiGridListSetItemText ( GUIEditor.gridlist[2], row, column, getPlayerName ( p), false, false ) end end --- GUIEditor.button[3] = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) guiSetVisible (GUIEditor.window[1], false) bindKey( key, "down",function() guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end) addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) سيرفر addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox ("تم التحويل") end end) الميتا - type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> Link to comment
iMr.WiFi..! Posted May 23, 2016 Share Posted May 23, 2016 كلنت changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); end; end; end; end; end; local key = "F4" GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) changeGridListItemToPlayersName(gridName,column) buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) guiSetVisible (GUIEditor.window[1], false) bindKey( key, "down",function() guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end) addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) سيرفر addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox("تم التحويل",source,0,255,0,true) end end) ميتا type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> Link to comment
[KilleR] Posted May 23, 2016 Author Share Posted May 23, 2016 كلنت changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); end; end; end; end; end; local key = "F4" GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) column = guiGridListAddColumn(GUIEditor.gridlist[2], "اللاعبين", 0.9) changeGridListItemToPlayersName(gridName,column) buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) guiSetVisible (GUIEditor.window[1], false) bindKey( key, "down",function() guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end) addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) سيرفر addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox("تم التحويل",source,0,255,0,true) end end) ميتا type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> مشكله ثانيه اختفى اللاعبين من القريد ليست - حاولت احول مايقول تم التحويل ولا اي كلام Link to comment
iMr.WiFi..! Posted May 23, 2016 Share Posted May 23, 2016 جرب + مزبوط %100 كلينت changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); end; end; end; end; end; local key = "F4" GUIEditor = { button = {}, edit = {}, window = {}, gridlist = {}, label = {}, } GUIEditor.window[1] = guiCreateWindow(210, 134, 374, 394, "لوحة - ارسال المال", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[2] = guiCreateLabel(22, 342, 198, 44, "Created By Iphone", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) gridName = guiCreateGridList(9, 20, 129, 320, false, GUIEditor.window[1]) column = guiGridListAddColumn(gridName, "اللاعبين", 0.9) changeGridListItemToPlayersName(gridName,column) buttonName = guiCreateButton(243, 21, 122, 45, "ارسال", false, GUIEditor.window[1]) editName = guiCreateEdit(245, 76, 120, 30, "", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(208, 85, 79, 43, " : المبلغ", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[7], 125, 253, 0) guiSetVisible (GUIEditor.window[1], false) bindKey( key, "down",function() guiSetVisible (GUIEditor.window[1], not guiGetVisible (GUIEditor.window[1]) ) showCursor ( guiGetVisible (GUIEditor.window[1]) ) end) addEventHandler ("onClientGUIClick",buttonName, function () local selected = guiGridListGetSelectedItem (gridName) if selected ~= -1 and tonumber(guiGetText(editName)) then local plrName = guiGridListGetItemText (gridName,selected,1) local plr = getPlayerFromName (plrName) if plr then triggerServerEvent ("Tran",localPlayer,guiGetText(editName),plr,plrName) end end end,false) سيرفر addEvent ("Tran",true) addEventHandler ("Tran",root, function (amm,plr,name) if getPlayerMoney(source) >= tonumber(amm) then givePlayerMoney(plr,tonumber(amm)) takePlayerMoney (source,tonumber(amm)) outputChatBox("تم التحويل",source,0,255,0,true) end end) ميتا type="misc" version="3.0.2" name="Iphone2" author="Iphone"/> Link to comment
Mr.R Posted May 24, 2016 Share Posted May 24, 2016 مايحول عشان amm -- مالها اي معنى من جانب سيرفر -.- 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