SaedAmer Posted June 17, 2016 Share Posted June 17, 2016 السلام عليكم انا معي جريد لست فيها اسماء الاعبين و بطن عاوز لما احدد علي حد في الجريد لست و اكتب في الادت اي شئ و اضغط بطن يعطيلو التاج مثلا انا اخترت نفسي و كتبت في الايدت كده Owner و ضغط بطن يطلع في الشات كده *[ Owner ]x |xSaedAmer |xSaedAmer ده اسمي Link to comment
#|_oskar_|# Posted June 17, 2016 Share Posted June 17, 2016 استخدم الداتا setElementData + getElementData Link to comment
Adham Posted June 17, 2016 Share Posted June 17, 2016 جرب . ملحوظة : غير مجرب كلنت addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if( source == button ) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'Tag',guiGetText (edittag)) setElementData (localPlayer,'colour',guiGetText (editcolor)) end end end ) سرفر function Tags (msg,Colour) local player = getPlayerFromName(source) if ( player ) then local tag = getElementData(source,"Tag") local colour = getElementData(source,"colour") outputChatBox(colour..' '.. tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end end) addEventHandler("onPlayerChat",root,Tags) Link to comment
SaedAmer Posted June 17, 2016 Author Share Posted June 17, 2016 كده ؟ + فين الكود الي هو يعرف ان انا مختار لاعب من الجريد لست وكيف اخليها كده *[ التاج ]x اسم الاعب كلنت addEventHandler("onClientGUIClick",root, function() if(source == GUIEditor.button[1]) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'tag',guiGetText (GUIEditor.edit[1])) end elseif(source == GUIEditor.button[2]) then setElementData (localPlayer,'tag',false) end end) سيرفر addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") outputChatBox(tag ..' '.. getPlayerName(source) .. ' : '.. msg,root, r, g, b, true) return cancelEvent() end) Link to comment
Adham Posted June 17, 2016 Share Posted June 17, 2016 جرب .ملحوظة : غير مجرب كلنت addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if( source == button ) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'Tag',guiGetText (edittag)) setElementData (localPlayer,'colour',guiGetText (editcolor)) end end end ) جرب ذا سرفر function Tags (msg,Colour) local player = getPlayerFromName(source) if ( player ) then local tag = getElementData(source,"Tag") local colour = getElementData(source,"colour") outputChatBox(colour..' '.. tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end end) addEventHandler("onPlayerChat",root,Tags) Link to comment
Adham Posted June 17, 2016 Share Posted June 17, 2016 جرب .ملحوظة : غير مجرب كلنت addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if( source == button ) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'Tag',guiGetText (edittag)) setElementData (localPlayer,'colour',guiGetText (editcolor)) end end end ) سرفر function Tags (msg,Colour) local player = getPlayerFromName(source) if ( player ) then local tag = getElementData(source,"Tag") local colour = getElementData(source,"colour") outputChatBox(colour..' '.. tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end end) addEventHandler("onPlayerChat",root,Tags) جرب ذا Link to comment
#|_oskar_|# Posted June 17, 2016 Share Posted June 17, 2016 ^^ جانب سيرفر سطر 10 في قوس زياده + الكود مو حقك Link to comment
SaedAmer Posted June 17, 2016 Author Share Posted June 17, 2016 + الكود اساسا ما اشتغل Link to comment
SaedAmer Posted June 17, 2016 Author Share Posted June 17, 2016 كلنت addEvent ( 'open', true ) addEventHandler ( 'open', root, function ( ) 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 ) addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local text = guiGridListGetItemText(GUIEditor.gridlist[1],sel,1) if( source == button ) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'Tag',guiGetText (GUIEditor.edit[1])) setElementData (localPlayer,'colour',guiGetText (GUIEditor.edit[2])) end end end ) function update () guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs (getElementsByType("player")) do local rp = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rp,1,getPlayerName(v),false,false) end end addEventHandler ("onClientResourceStart",resourceRoot,update) addEventHandler ("onClientPlayerJoin",root,update) addEventHandler ("onClientPlayerChangeNick",root,update) addEventHandler ("onClientPlayerQuit",root,update) سيرفر addCommandHandler ( 'open', function ( thePlayer ) accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ('user.'..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent( thePlayer, 'open', thePlayer ) else outputChatBox ( "* You Don't Have Permissions !!", thePlayer, 255, 0, 0, true ) end end ) function Tags (msg,Colour) local player = getPlayerFromName(source) if ( player ) then local tag = getElementData(source,"Tag") local colour = getElementData(source,"colour") outputChatBox(colour..' *['.. tag ..']x '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end end addEventHandler("onPlayerChat",root,Tags) Link to comment
N3xT Posted June 17, 2016 Share Posted June 17, 2016 ي لعبة كيف تعطي الداتا للوكال بلاير ؟ وهو يبي يحط التاج للاعب المحدد مب اللوكل بلاير setElementData (localPlayer,'Tag',guiGetText (edittag)) setElementData (localPlayer,'colour',guiGetText (editcolor)) Link to comment
#|_oskar_|# Posted June 17, 2016 Share Posted June 17, 2016 جرب GUIEditor = {gridlist = {},window = {},button = {},edit = {}} GUIEditor.window[1] = guiCreateWindow(0.30, 0.20, 0.25, 0.55, "Tag", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 26, 228, 316, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players ...", 0.9) GUIEditor.edit[1] = guiCreateEdit(0.04, 0.82, 0.91, 0.07, "", true, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(0.04, 0.91, 0.91, 0.07, "add tag", true, GUIEditor.window[1]) --------- Events = function () guiGridListClear(GUIEditor.gridlist[1]) for _, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row,1, getPlayerName ( player ), false, false ) local r, g, b = getPlayerNametagColor (player) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1, r, g, b ) end end addEventHandler ("onClientResourceStart" ,root,Events ) addEventHandler ("onClientPlayerChangeNick" ,root,Events ) addEventHandler ("onClientPlayerQuit" ,root,Events ) addEventHandler ("onClientPlayerJoin" ,root,Events ) ---------- addEventHandler("onClientGUIClick",GUIEditor.button[1],function() local playerName = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1] ), 1 ) if playerName and guiGetText(GUIEditor.edit[1]) then triggerServerEvent("Add:tag",localPlayer,playerName,guiGetText(GUIEditor.edit[1])) end end,false) addEvent("Add:tag",true) addEventHandler("Add:tag", getRootElement(),function(Player,tag) local name = getPlayerFromName(Player) if name then setElementData (name,'tag',tag) end end) addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") or 'player' local Name = getPlayerName(source) outputChatBox(tag ..' '.. Name..' : '.. msg,root, 255, 0, 255, true) return cancelEvent() end) Link to comment
SaedAmer Posted June 17, 2016 Author Share Posted June 17, 2016 جرب GUIEditor = {gridlist = {},window = {},button = {},edit = {}} GUIEditor.window[1] = guiCreateWindow(0.30, 0.20, 0.25, 0.55, "Tag", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(9, 26, 228, 316, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players ...", 0.9) GUIEditor.edit[1] = guiCreateEdit(0.04, 0.82, 0.91, 0.07, "", true, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(0.04, 0.91, 0.91, 0.07, "add tag", true, GUIEditor.window[1]) --------- Events = function () guiGridListClear(GUIEditor.gridlist[1]) for _, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row,1, getPlayerName ( player ), false, false ) local r, g, b = getPlayerNametagColor (player) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1, r, g, b ) end end addEventHandler ("onClientResourceStart" ,root,Events ) addEventHandler ("onClientPlayerChangeNick" ,root,Events ) addEventHandler ("onClientPlayerQuit" ,root,Events ) addEventHandler ("onClientPlayerJoin" ,root,Events ) ---------- addEventHandler("onClientGUIClick",GUIEditor.button[1],function() local playerName = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1] ), 1 ) if playerName and guiGetText(GUIEditor.edit[1]) then triggerServerEvent("Add:tag",localPlayer,playerName,guiGetText(GUIEditor.edit[1])) end end,false) addEvent("Add:tag",true) addEventHandler("Add:tag", getRootElement(),function(Player,tag) local name = getPlayerFromName(Player) if name then setElementData (name,'tag',tag) end end) addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") or 'player' local Name = getPlayerName(source) outputChatBox(tag ..' '.. Name..' : '.. msg,root, 255, 0, 255, true) return cancelEvent() end) اوسكار كودك شغال علي or بس لما احط التاج ما يترسل للاعب + عاوز التاج كده *[ هنا التاج ]x اسم العب هنا Link to comment
Me[Z]oO Posted June 18, 2016 Share Posted June 18, 2016 ^^جانب سيرفر سطر 10 في قوس زياده + الكود مو حقك هذا لعبة اسم علي مسمي يطلب مواضيع تافهه ومسوي هالكود الحلو Link to comment
Adham Posted June 18, 2016 Share Posted June 18, 2016 من لعبه؟ يطلب اكواد تافهه؟ اكواد تفهه مثلك ^ لاكن المنتدي مب ملكك عشان تقولي انزل موضوع ولا لا ! وبعدين انك م تبي تفهم اني مب SaedAmer انت م تبي تفهم شي يرجع لك لاكن مالي دخل فيك انا . + هذا يدل علي غبائك انك م تبي تفهم Link to comment
Me[Z]oO Posted June 18, 2016 Share Posted June 18, 2016 من لعبه؟يطلب اكواد تافهه؟ اكواد تفهه مثلك ^ لاكن المنتدي مب ملكك عشان تقولي انزل موضوع ولا لا ! وبعدين انك م تبي تفهم اني مب SaedAmer انت م تبي تفهم شي يرجع لك لاكن مالي دخل فيك انا . + هذا يدل علي غبائك انك م تبي تفهم بل يدل علي غبائك ^.^ انا قلت انك سعيد عامر ؟ ال 900 مشاركة حقتك دول كلهم من مواضيعك التافهه فلا تسوي مبرمج كبير وتنسخ الاكواد وتلصق وانت مو فاهم محتوي الموضوع اصلا Link to comment
Adham Posted June 18, 2016 Share Posted June 18, 2016 لا اسوي نفسي مبرمج؟ علي اساس انك مبرمج بتقول ال900 مشاركه عبيط قسم . + م حد طلب رايك في اني مبرمج او لا لا تحتك بي 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