Jump to content

SaedAmer

Members
  • Posts

    906
  • Joined

  • Last visited

Details

  • Gang
    #[AL MLOoK|الملووك]#
  • Location
    #Egypt

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SaedAmer's Achievements

Hoodsta

Hoodsta (34/54)

5

Reputation

  1. كدا لو ضغط علي البوطن اكتر من مرة هيظهرلي النافذة اكتر من مرة مش نفسها
  2. المفروض يبقا كدا using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows; using System.IO; namespace Server_Send_Text { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Button1_Click(object sender, EventArgs e) { ff.Show(); this.Hide(); private void Button2_Click(object sender, EventArgs e) { Application.Exit(); } } } لكن يظهر خطأ صورة للخطأ https://1.top4top.net/p_13062u79k1.png
  3. السلام عليكم بيحدث اخطاء غريبة في كتابة الكود و لما اكتبه ب vb.net بيجي مظبوط سألت كام شخص قالي المكبة ناقصة ف ايه حلها احد الاخطأ مثلا private void Button2_Click(object sender, EventArgs e) { Form2.Show(); this.Hide(); } بيجيبلي خطأ و عشان اعلاجها لازم اعرف الفورم من جديد و ده بيؤدي اني لما اضغط علي البوتن اكتر من مرة هيفتح الفورم اكتر من مرة مش نفس الفروم مثال private void Button2_Click(object sender, EventArgs e) { Form2 ff = new Form2(); ff.Show(); this.Hide(); }
  4. الحذف ما يحذف شئ ------------ اخر شئ في هدول local tag = getElementData(source,"tag") or 'player' local colour = getElementData(source,"colour") or '#FFFFFF' انا مسوي مود تاج م حاتط كود ما يكررو مع بعض if getElementData(source,"tag") then return cancelEvent() end if type == 1 or type == 2 then return end الكود شغال و كل شئ بس لما احط تاق فقط ف انا اقدر امسح or 'player' or '#FFFFFF' و اخليهم كدا local tag = getElementData(source,"tag") local colour = getElementData(source,"colour") بدون ما يجيني اي خطأ بالدي بق ؟ جربت و جالي خطأ فالتاج و الكولور
  5. كلنت GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 431) / 2, (screenH - 402) / 2, 431, 402, "Tag Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFFFEFE") GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 230, 370, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.edit[1] = guiCreateEdit(250, 32, 171, 31, "التاج", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(250, 70, 171, 32, "#FFFFFF", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(246, 325, 75, 29, "حذف", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFEFE") GUIEditor.button[2] = guiCreateButton(346, 325, 75, 29, "تفعيل", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFEFE") GUIEditor.label[1] = guiCreateLabel(316, 373, 99, 19, "Created By #S3eeD", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 225, 0, 0) guiSetVisible( GUIEditor.window[1], false) end ) 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 ) ---------- addEvent("AddTag",true) addEventHandler("AddTag", root , function ( plr , value ) if ( getPlayerFromName ( plr ) ) then setElementData ( getPlayerFromName ( plr ) , "tag" , value ) ; savePlayerTag ( getPlayerFromName ( plr ) ) outputChatBox("Right!",source,100,100,100,true) 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) -------------- addEventHandler( 'onClientGUIClick', root, function() if (source == GUIEditor.button[2]) then outputChatBox('# [TagSystem]: تم تفعيل التاج ',0,255,0,true ) end end ) addEventHandler( 'onClientGUIClick', root, function() if (source == GUIEditor.button[1]) then outputChatBox('# [TagSystem]: تم ارجاع التاج كما كان ',255,0,0,true ) end end ) addEventHandler("onClientGUIClick",root, function ( ) if( source == GUIEditor.button[2] ) then if guiGetText ( GUIEditor.edit[1] ) ~= '' then setElementData (localPlayer,'tag',guiGetText (GUIEditor.edit[1])) setElementData (localPlayer,'colour',guiGetText (GUIEditor.edit[2])) end elseif( source == GUIEditor.button[1] ) then triggerServerEvent("DelTag",localPlayer) end end ) outputChatBox('# [TagSystem]: Created By #S3eeD',0,255,0,true ) سيرفر 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 ) addEvent("AddTag",true) addEventHandler("AddTag", root , function ( plr , value ) if ( getPlayerFromName ( plr ) ) then setElementData ( getPlayerFromName ( plr ) , "tag" , value ) ; savePlayerTag ( getPlayerFromName ( plr ) ) end end) executeSQLQuery("CREATE TABLE IF NOT EXISTS PlayersTag (player, serial, tag, colour)") addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") or 'player' local colour = getElementData(source,"colour") or '#FFFFFF' outputChatBox("#FF0000 # #FFFFFF[ #CD0000"..tag .."#FFFFFF ]x #A5A5A5".. getPlayerName(source) .. ""..colour.." : ".. msg.."",root, 255, 255, 255, true) return cancelEvent() end) ------------ function getPlayerTag ( player ) local playerSerial = player and getPlayerSerial ( player ) local playerResult = executeSQLQuery("SELECT * FROM PlayersTag WHERE serial = ? ", playerSerial ) if ( #playerResult ~= 0 and type ( playerResult ) == "table" ) then return playerResult [ 1 ] [ "tag" ] , playerResult [ 1 ] [ "colour" ] end return false end function savePlayerTag ( player ) local playerSerial = player and getPlayerSerial ( player ) local playerTag = getElementData ( player , "tag" ) or false local playerColor = getElementData ( player , "colour" ) or false local playerName = getPlayerName ( player ) if ( not playerTag or not playerColor ) then return false end if ( getPlayerTag ( player ) ~= false ) then executeSQLQuery("UPDATE PlayersTag SET player=?,tag=?,colour=? WHERE serial=?", playerName, playerTag, playerColor,playerSerial) else executeSQLQuery("INSERT INTO PlayersTag(player, serial, tag, colour) VALUES(?,?,?,?)", playerName, playerSerial, playerTag, playerColor) return true end return false end addEventHandler("onPlayerQuit", root, function ( ) savePlayerTag ( source ) end ) addEventHandler("onPlayerLogin", root, function ( ) local playerTag , playerColor = getPlayerTag ( source ) if ( playerTag and playerColor ) then setElementData ( source , "tag" , playerTag ) setElementData ( source , "colour" , playerColor ) end end ) ------------- function DeletePlayerTag ( player ) if ( getPlayerTag ( player ) == false ) then return false end local playerSerial = getPlayerSerial ( player ) executeSQLQuery("DELETE FROM PlayersTag WHERE serial=?", playerSerial ) setElementData ( player , "tag" , false ) setElementData ( player , "colour" , false ) return true end addEvent("DelTag",true) addEventHandler("DelTag", root, function ( ) DeletePlayerTag ( source ) end )
  6. جربت الكود محصلش حاجة نفس الكلام + التاج مش بيتمسح و طبعا اذا تفيط المود مقدر اتكلم بالشات دي الاكواد كاملة بدون الوحة كلنت ------- guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.edit[1] = guiCreateEdit(250, 32, 171, 31, "التاج", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(250, 70, 171, 32, "#FFFFFF", false, GUIEditor.window[1]) ---------- addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == GUIEditor.button[1] ) then local sel = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) ; if ( sel ~= 0 and guiGetText ( GUIEditor.edit[1] ) ~= "" ) then triggerServerEvent ( "AddTag" , localPlayer , guiGridListGetItemText ( GUIEditor.gridlist[1] , sel , 1 ) , guiGetText ( GUIEditor.edit[1] ) ); 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) -------------- addEventHandler( 'onClientGUIClick', root, function() if (source == GUIEditor.button[2]) then outputChatBox('# [TagSystem]: تم تفعيل التاج ',0,255,0,true ) end end ) addEventHandler( 'onClientGUIClick', root, function() if (source == GUIEditor.button[1]) then outputChatBox('# [TagSystem]: تم ارجاع التاج كما كان ',255,0,0,true ) end end ) addEventHandler("onClientGUIClick",root, function ( ) if( source == GUIEditor.button[2] ) then if guiGetText ( GUIEditor.edit[1] ) ~= '' then setElementData (localPlayer,'tag',guiGetText (GUIEditor.edit[1])) setElementData (localPlayer,'colour',guiGetText (GUIEditor.edit[2])) end elseif( source == GUIEditor.button[1] ) then triggerServerEvent("DelTag",localPlayer) end end ) outputChatBox('# [TagSystem]: Created By #S3eeD',0,255,0,true ) سيرفر addEvent("AddTag",true) addEventHandler("AddTag", root , function ( plr , value ) if ( getPlayerFromName ( plr ) ) then setElementData ( getPlayerFromName ( plr ) , "tag" , value ) ; savePlayerTag ( getPlayerFromName ( plr ) ) end end) executeSQLQuery("CREATE TABLE IF NOT EXISTS PlayersTag (player, serial, tag, colour)") addEventHandler("onPlayerChat",root,function (msg) local tag = getElementData(source,"tag") or 'player' local colour = getElementData(source,"colour") or '#FFFFFF' outputChatBox("#FF0000 # #FFFFFF[ #CD0000"..tag .."#FFFFFF ]x #A5A5A5".. getPlayerName(source) .. ""..colour.." : ".. msg.."",root, 255, 255, 255, true) return cancelEvent() end) ------------ function getPlayerTag ( player ) local playerSerial = player and getPlayerSerial ( player ) local playerResult = executeSQLQuery("SELECT * FROM PlayersTag WHERE serial = ? ", playerSerial ) if ( #playerResult ~= 0 and type ( playerResult ) == "table" ) then return playerResult [ 1 ] [ "tag" ] , playerResult [ 1 ] [ "colour" ] end return false end function savePlayerTag ( player ) local playerSerial = player and getPlayerSerial ( player ) local playerTag = getElementData ( player , "tag" ) or false local playerColor = getElementData ( player , "colour" ) or false local playerName = getPlayerName ( player ) if ( not playerTag or not playerColor ) then return false end if ( getPlayerTag ( player ) ~= false ) then executeSQLQuery("UPDATE PlayersTag SET player=?,tag=?,colour=? WHERE serial=?", playerName, playerTag, playerColor,playerSerial) else executeSQLQuery("INSERT INTO PlayersTag(player, serial, tag, colour) VALUES(?,?,?,?)", playerName, playerSerial, playerTag, playerColor) return true end return false end addEventHandler("onPlayerQuit", root, function ( ) savePlayerTag ( source ) end ) addEventHandler("onPlayerLogin", root, function ( ) local playerTag , playerColor = getPlayerTag ( source ) if ( playerTag and playerColor ) then setElementData ( source , "tag" , playerTag ) setElementData ( source , "colour" , playerColor ) end end ) ------------- function DeletePlayerTag ( player ) if ( getPlayerTag ( player ) == false ) then return false end local playerSerial = getPlayerSerial ( player ) executeSQLQuery("DELETE FROM PlayersTag WHERE serial=?", playerSerial ) setElementData ( player , "tag" , false ) setElementData ( player , "colour" , false ) return true end addEvent("DelTag",true) addEventHandler("DelTag", root, function ( ) DeletePlayerTag ( source ) end )
  7. اخوي كود الحفط تمام اشتغل انا اتكلم علي ده هذا لما اختار لاعب من الجريد لست و اكتب في التاج و الون و اضغط البوتن التاج يروح للاعب الي انا محدده ---- جربت الكود ماشتغل ولا طلع شئ بالديب بق
  8. up مساعده شباب -----------------------
  9. جربت ما شتغل و ما في شئ بالدي بق
  10. صح ؟ كلنت ---------- 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("AddTag",localPlayer,playerName,guiGetText(GUIEditor.edit[1])) end end,false) سيرفر addEvent("AddTag",true) addEventHandler("AddTag", getRootElement(),function(Player,tag) local name = getPlayerFromName(Player) if name then setElementData (name,'tag',tag) end end)
  11. تمام شكرا دلوقتي عاوز فكشانات عبارة عن لما اضغط علي لاعب من الجريد لست التاج يروحله هوا مش يجيلي انا
  12. كده ؟ كلنت ----- addEventHandler("onClientGUIClick",root,function() if(source == GUIEditor.button[2]) then if guiGetText (GUIEditor.edit[1]) ~= '' then setElementData (localPlayer,'tag',guiGetText (GUIEditor.edit[1])) setElementData (localPlayer,'colour',guiGetText (GUIEditor.edit[2])) end elseif(source == GUIEditor.button[1]) then setElementData (localPlayer,'tag',false) setElementData (localPlayer,'colour',false) triggerServerEvent("DelTag",localPlayer) end end) -------- سيرفر addEvent("noLocal",true) addEventHandler("noLocal", root, function() local tag = executeSQLQuery ( "DELETE tag FROM PlayersTag WHERE Serial =?", getPlayerSerial(source) ) local colour = executeSQLQuery ( "DELETE colour FROM PlayersTag WHERE Serial =?", getPlayerSerial(source) ) end )
×
×
  • Create New...