saef Posted August 24, 2015 Share Posted August 24, 2015 السلامممم عليكم ورحة الله و بركاتو اليوم ابي تساعدون لاهنت اذا تقدرون اول: انا سوية لوحه فيه ادت بوكس اثنين الاول ينحط في سريال العب و الثاني: تاحج العب buttonوفيه تحته زرين واحد ي ركب التاج لي العب و الثاني يحذفه ساعدوني تكفونء كلنتء GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") end ) guiSetVisible (GUIEditor.window[1] , false) 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 bindKey("F6", "down", OpenWin) function getPlayerFromSerial ( serial ) assert ( type ( serial ) == "string" and #serial == 32, "getPlayerFromSerial - invalid serial" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end سيرفر: function getPlayerFromSerial ( serial ) assert ( type ( serial ) == "string" and #serial == 32, "getPlayerFromSerial - invalid serial" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "TagState" ) ~= "START" ) then return end cancelEvent ( ) outputChatBox (" ( "..getSerialData ( getPlayerSerial ( source ), "playerTag" ).." ) "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end end Link to comment
MR.GRAND Posted August 24, 2015 Share Posted August 24, 2015 أظن أن نفس طلبك موجود بالقسم بس لو أنت دورت شوي كان لقيته https://forum.multitheftauto.com/viewtopic.php?f ... 68#p813568 Link to comment
saef Posted August 25, 2015 Author Share Posted August 25, 2015 أظن أن نفس طلبك موجود بالقسم بس لو أنت دورت شوي كان لقيته https://forum.multitheftauto.com/viewtopic.php?f ... 68#p813568 ي حلو هذاك زر واحد وياذا ضربته تجي كلمه ير اما انا زرين مو فهمتتت Link to comment
iMr.SFA7 Posted August 25, 2015 Share Posted August 25, 2015 وأنت موب قآدر تعدله وتخليه بـ زرين ؟ Link to comment
MR.GRAND Posted August 25, 2015 Share Posted August 25, 2015 وأنت موب قآدر تعدله وتخليه بـ زرين ؟ يبي نعطيه الاكواد جاهزة بدون مايتعب Link to comment
saef Posted August 25, 2015 Author Share Posted August 25, 2015 وأنت موب قآدر تعدله وتخليه بـ زرين ؟ يبي نعطيه الاكواد جاهزة بدون مايتعب ي حليلك ترى قناتك موداتك كله من الموقع ذا يجبون لك الاكواد جاهز وانت تسويه و تشفرهـ ههههه ي حليلكء ي جراند ههههه المهم سفآح يلد الامكواد ذي في T_قبل كل شيء ههه مليه ن كذا هههه مدري وش هي Link to comment
iMr.SFA7 Posted August 25, 2015 Share Posted August 25, 2015 رآجع هـ الموضوع https://forum.multitheftauto.com/viewtopic.php?f ... 68#p813568 وأربط كود النافذة حقتكـ بالكود حق التآج وأطرح الكود بعد التعديل وأنا بحطهـ لككـ بـ زرين Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 رآجع هـ الموضوعhttps://forum.multitheftauto.com/viewtopic.php?f ... 68#p813568 وأربط كود النافذة حقتكـ بالكود حق التآج وأطرح الكود بعد التعديل وأنا بحطهـ لككـ بـ زرين اوك ي سفآحح GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") end ) guiSetVisible (GUIEditor.window[1] , false) 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 bindKey("F6", "down", OpenWin) addEventHandler("onClientGUIClick",root, function () if source == T_Close then if(guiGetVisible(T_WND) == false)then end guiSetVisible(T_WND,false) showCursor(false) guiSetInputEnabled(false) end end) addEventHandler("onClientGUIClick",root, function () if source == T_Enable then local text = (guiGetText(T_Enable)) if ( text == "Enable TAG for Player" ) then guiSetText(T_Enable,"Disable TAG for player") TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "Disable TAG for player" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, T_Enable, true) end local text = (guiGetText(T_Enable)) if ( text == "Disable TAG for player" ) then guiSetText(T_Enable,"Enable TAG for Player") guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, T_Enable, true) end end end ) Link to comment
iMr.SFA7 Posted August 26, 2015 Share Posted August 26, 2015 بدل متغيرات الأكواد بـ متغيرآتككـ وكمل ملف السيرفر -.- Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 بدل متغيرات الأكواد بـ متغيرآتككـ وكمل ملف السيرفر -.- كيف متغيرت الاكوآدء وهذا السيرفر function getPlayerFromSerial ( serial ) assert ( type ( serial ) == "string" and #serial == 32, "getPlayerFromSerial - invalid serial" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "TagState" ) ~= "START" ) then return end cancelEvent ( ) outputChatBox (" ( "..getSerialData ( getPlayerSerial ( source ), "playerTag" ).." ) "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end end Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 بدل متغيرات الأكواد بـ متغيرآتككـ وكمل ملف السيرفر -.- قصدك كذآ GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") end ) guiSetVisible (GUIEditor.window[1] , false) 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 bindKey("F6", "down", OpenWin) addEventHandler("onClientGUIClick",root, function () if source == T_Close then if(guiGetVisible(GUIEditor.window[1]) == false)then end guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiSetInputEnabled(false) end end) addEventHandler("onClientGUIClick",root, function () if source == Start-Tag then local text = (guiGetText()Start-Tag) if ( text == "Start-Tag" ) then guiSetText(Start-Tag,"STOP-Tag") TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "STOP-Tag" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Start-Tag, true) end local text = (guiGetText(Start-Tag)) if ( text == "STOP-Tag" ) then guiSetText(Start-Tag,"Start-Tag") guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Start-Tag, true) end end end ) Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 سفآح انا عدل عليه كلنت: GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") end ) guiSetVisible (GUIEditor.window[1] , false) 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 bindKey("F6", "down", OpenWin) addEventHandler("onClientGUIClick",root, function () if source == T_Close then if(guiGetVisible(GUIEditor.window[1]) == false)then end guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiSetInputEnabled(false) end end) addEventHandler("onClientGUIClick",root, function () if source == Start-Tag then local text = (guiGetText()Start-Tag) if ( text == "Start-Tag" ) then guiSetText(Start-Tag,"STOP-Tag") TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "STOP-Tag" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Start-Tag, true) end local text = (guiGetText(Start-Tag)) if ( text == "STOP-Tag" ) then guiSetText(Start-Tag,"Start-Tag") guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Start-Tag, true) end end سيرفر addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "TagState" ) ~= "Start-Tag" ) then return end cancelEvent ( ) outputChatBox (" ( "..getSerialData ( getPlayerSerial ( source ), "playerTag" ).." ) "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end Link to comment
iMr.SFA7 Posted August 26, 2015 Share Posted August 26, 2015 أنت حآط متغير الزر GUIEditor.button[2] وحآط بالضغط ع الزر Start-Tag ؟؟؟؟؟؟ Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 أنت حآط متغير الزر GUIEditor.button[2]وحآط بالضغط ع الزر Start-Tag ؟؟؟؟؟؟ كيف؟ وش تقصد Link to comment
saef Posted August 26, 2015 Author Share Posted August 26, 2015 أنت حآط متغير الزر GUIEditor.button[2]وحآط بالضغط ع الزر Start-Tag ؟؟؟؟؟؟ كيف؟ وش تقصد سفاح انا عدلت عليه بس والله لم اضرب ستارت م يجي بي الشات كلنت GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") end ) guiSetVisible (GUIEditor.window[1] , false) 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == T_Close ) then guiSetVisible ( GUIEditor.window[1] , false ) showCursor ( false ) elseif ( source == GUIEditor.button[1] ) then if ( string.len ( guiGetText ( GUIEditor.label[2]) ) == 32 and string.len ( guiGetText ( GUIEditor.label[1]) ) >= 3 ) then local player_ = getPlayerFromSerial ( guiGetText ( GUIEditor.label[2] ) ) if ( player_ ) then if ( guiGetText ( GUIEditor.button[2]) == "Start-Tag" ) then setSerialData ( guiGetText ( GUIEditor.label[2]), "TagState", "Tag" ) setSerialData ( guiGetText ( GUIEditor.label[2]), "PlayerTag", guiGetText ( GUIEditor.label[1])) guiSetText (GUIEditor.button[1], "STOP-Tag" ) else guiSetText ( GUIEditor.button[2], "Start-Tag" ) setSerialData ( guiGetText ( GUIEditor.label[2]), "TagState", "STOP" ) end end end end end ) addEventHandler ( "onClientGUIChanged", GUIEditor.label[2] , function ( ) local player_ = getPlayerFromSerial ( guiGetText ( source ) ) if ( player_ ) then if ( getSerialData ( guiGetText ( source ), "TagState" ) == "Start-Tag" ) then guiSetText (GUIEditor.button[1], "STOP-Tag" ) else guiSetText ( GUIEditor.button[2], "Start-Tag" ) end end end ) function getPlayerFromSerial ( serial ) assert ( type ( serial ) == "string" and #serial == 32, "getPlayerFromSerial - invalid serial" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end سيرفر addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "TagState" ) ~= "GUIEditor.button[1]" ) then return end cancelEvent ( ) outputChatBox (" ( "..getSerialData ( getPlayerSerial ( source ), "PlayerTag" ).." ) "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end Link to comment
iMr.SFA7 Posted August 26, 2015 Share Posted August 26, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end -- Server Side addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "Tag" ) ~= true ) then return end cancelEvent ( ) outputChatBox (" "..getSerialData ( getPlayerSerial ( source ), "Tag" ).." "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end Link to comment
saef Posted August 27, 2015 Author Share Posted August 27, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end -- Server Side addEventHandler ( "onPlayerChat", root, function ( msg ) if ( getSerialData ( getPlayerSerial ( source ), "Tag" ) ~= true ) then return end cancelEvent ( ) outputChatBox (" "..getSerialData ( getPlayerSerial ( source ), "Tag" ).." "..getPlayerName ( source )..": #FFFFFF"..msg, root, 255, 255, 255, true ) end ) function getSerialData(serial,key) if ( key and type(serial) == "string") then value = getElementData(root,serial.."&"..key) end return value end سويته و طيت اللكنت و السيرفر و شغلت المود مو راضي يظهر Link to comment
iMr.SFA7 Posted August 27, 2015 Share Posted August 27, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end Link to comment
saef Posted August 27, 2015 Author Share Posted August 27, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( T_Serial ), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end الوحه ظهرت بس ي حبي التاج م يجي بي الشات ميظهر بي الشآات Link to comment
iMr.SFA7 Posted August 27, 2015 Share Posted August 27, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( GUIEditor.edit[1]), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( GUIEditor.edit[1]), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end جرب هذآ ^ ووتأكد من سيريالككـ مجرد مسافة صغيرة رآح يصير خطأ Link to comment
saef Posted August 27, 2015 Author Share Posted August 27, 2015 -- Client Side GUIEditor = { button = {}, window = {}, label = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(369, 181, 507, 463, "x[لـــوحـــة تـــآجــآت خـــآصــه]x", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(110, 63, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(110, 116, 319, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(44, 67, 95, 33, "PlayerTag", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 35, 243, 7) GUIEditor.label[2] = guiCreateLabel(48, 116, 95, 33, "PlayerSerial", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 250, 0, 0) GUIEditor.button[1] = guiCreateButton(293, 218, 157, 47, "STOP-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFC8F108") GUIEditor.button[2] = guiCreateButton(110, 218, 157, 47, "Start-Tag", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFF65E22") guiSetVisible (GUIEditor.window[1] , 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 bindKey("F6", "down", OpenWin) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then if ( string.len ( guiGetText ( GUIEditor.edit[1] ) ) == 32 ) then Player = getPlayerFromSerial ( guiGetText ( GUIEditor.edit[1] ) ) if ( Player ) then setSerialData ( guiGetText ( GUIEditor.edit[1]), "TagState", true ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) elseif ( source == GUIEditor.button[1] ) then if ( Player ) then setSerialData ( guiGetText ( GUIEditor.edit[1]), "TagState", false ) setSerialData ( guiGetText ( GUIEditor.edit[1] ), "Tag", guiGetText ( GUIEditor.edit[2] ) ) end end end end end ) function getPlayerFromSerial ( serial ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getPlayerSerial ( player ) == serial ) then return player end end return false end function setSerialData(serial,key,value) if( value and type(serial) == "string") then setElementData(root,serial.."&"..key,value) end end جرب هذآ ^ ووتأكد من سيريالككـ مجرد مسافة صغيرة رآح يصير خطأ م زبط جربت و م زبط Link to comment
Jupi Posted August 28, 2015 Share Posted August 28, 2015 متوقع منه يظهر و انت مانك حاطت له كود مشان يظهره 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