Adham Posted April 8, 2016 Author Share Posted April 8, 2016 local pass = "clr" function mm (name) if source == btn then if tostring(guiGetText(GUIEditor.edit[1])) == pass then guiSetText(GUIEditor.label[1],'تم مسح شات') rw = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rw,2,"* "..name.." ",false,false) end end end addEvent ("CLEAR",true) addEventHandler ("CLEAR",root,mm) addEventHandler"onClientGUIClick",root,mm) ما شتغل Link to comment
YourMind Posted April 8, 2016 Share Posted April 8, 2016 -- client addEventHandler ("onClientGUIClick",sendButton, function () if guiGetText (messageEdit) == "clr" then return triggerServerEvent ("Clear",localPlayer,getPlayerName(localPlayer)) end --sendMessage code end) addEvent ("CLEAR",true) addEventHandler ("CLEAR",root, function (name) guiGridListClear (GUIEditor.gridlist[1]) rw = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rw,2,"**CLEARED BY "..name.."**",false,false) end) -- server addEvent ("Clear",true) addEventHandler ("Clear",root, function (name) for i,k in ipairs (getElementsByType("player")) do triggerClientEvent (k,"CLEAR",k,name) end end) Link to comment
YourMind Posted April 8, 2016 Share Posted April 8, 2016 -- client addEventHandler ("onClientGUIClick",sendButton, function () if guiGetText (messageEdit) == "clr" then return triggerServerEvent ("Clear",localPlayer,getPlayerName(localPlayer)) end --sendMessage code end) addEvent ("CLEAR",true) addEventHandler ("CLEAR",root, function (name) guiGridListClear (GUIEditor.gridlist[1]) rw = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rw,2,"**CLEARED BY "..name.."**",false,false) end) -- server addEvent ("Clear",true) addEventHandler ("Clear",root, function (name) for i,k in ipairs (getElementsByType("player")) do triggerClientEvent (k,"CLEAR",k,name) end end) Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 (edited) GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } GUIEditor.window[1] = guiCreateWindow(294, 221, 502, 343, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(40, 116, 382, 142, false, GUIEditor.window[1]) col = guiGridListAddColumn(GUIEditor.gridlist[1], "chat", 0.9) GUIEditor.label[1] = guiCreateLabel(46, 40, 231, 57, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(24, 287, 114, 32, "مسح", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(252, 285, 214, 48, "", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1] ,false) showCursor(false) function open () guiSetVisible(GUIEditor.window[1] ,true) showCursor(true) end bindKey("F2","down",open) function mm () if source == GUIEditor.button[1] then if guiGetText(GUIEditor.edit[1]) == "clr" then guiGridListClear(GUIEditor.gridlist[1]) local name = getPlayerName(localPlayer) guiSetText(GUIEditor.label[1],'تم مسح شات') rw = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rw,col,"* "..name.." ",false,false) end end end addEvent ("CLEAR",true) addEventHandler ("CLEAR",root,mm) addEventHandler("onClientGUIClick",root,mm) Edited April 8, 2016 by Guest Link to comment
Ahmed Ly Posted April 8, 2016 Share Posted April 8, 2016 (edited) GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } GUIEditor.window[1] = guiCreateWindow(294, 221, 502, 343, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(40, 116, 382, 142, false, GUIEditor.window[1]) col = guiGridListAddColumn(GUIEditor.gridlist[1], "chat", 0.9) GUIEditor.label[1] = guiCreateLabel(46, 40, 231, 57, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(24, 287, 114, 32, "مسح", false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(252, 285, 214, 48, "", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1] ,false) showCursor(false) function open () guiSetVisible(GUIEditor.window[1] ,true) showCursor(true) end bindKey("F2","down",open) function mm () if source == GUIEditor.button[1] then if guiGetText(GUIEditor.edit[1]) == "clr" then guiGridListClear(GUIEditor.gridlist[1]) local name = getPlayerName(localPlayer) guiSetText(GUIEditor.label[1],'تم مسح شات') rw = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1],rw,col,"* "..name.." ",false,false) end end end addEvent ("CLEAR",true) addEventHandler ("CLEAR",root,mm) addEventHandler("onClientGUIClick",root,mm) Edited April 8, 2016 by Guest Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 جرب كذا كلينت aClear = "clr" addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == bb then isClear = guiGetText( Edit ) if isClear == tostring ( aClear ) then triggerServerEvent("Send_",localPlayer) end end end ) ; سيرفر addEvent("Send_",true) addEventHandler("Send_",root, function ( ) for i , player in ipairs ( getElementsByType ("player") ) do triggerClientEvent ( player ,"Clear_G", player , getPlayerName ( source ) ) end end ) ; كلينت addEvent("Clear_G",true) addEventHandler("Clear_G",root, function ( TheName ) guiGridListClear ( GUIEditor.gridlist[1] ) rw = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , rw ,2,"Cleared By "..TheName.." ",false,false) end ) ; Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 جرب كذا كلينت aClear = "clr" addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == bb then isClear = guiGetText( Edit ) if isClear == tostring ( aClear ) then triggerServerEvent("Send_",localPlayer) end end end ) ; سيرفر addEvent("Send_",true) addEventHandler("Send_",root, function ( ) for i , player in ipairs ( getElementsByType ("player") ) do triggerClientEvent ( player ,"Clear_G", player , getPlayerName ( source ) ) end end ) ; كلينت addEvent("Clear_G",true) addEventHandler("Clear_G",root, function ( TheName ) guiGridListClear ( GUIEditor.gridlist[1] ) rw = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , rw ,2,"Cleared By "..TheName.." ",false,false) end ) ; Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 ما شتغل تأكد انك كتبت clr بالايدت وغير اسم الزر سطر 6 اذا ماضبط شوف وش يطلع لك بالدي بوق Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 ما شتغل تأكد انك كتبت clr بالايدت وغير اسم الزر سطر 6 اذا ماضبط شوف وش يطلع لك بالدي بوق Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 بيقبي المشكله من هون aClear = "clr" Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 بيقبي المشكله من هون aClear = "clr" Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 (edited) جرب كذا addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == bb then isClear = guiGetText( Edit ) if isClear == "clr" then triggerServerEvent("Send_",localPlayer) end end end ) ; Edited April 8, 2016 by Guest Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 (edited) جرب كذا addEventHandler("onClientGUIClick",resourceRoot, function ( ) if source == bb then isClear = guiGetText( Edit ) if isClear == "clr" then triggerServerEvent("Send_",localPlayer) end end end ) ; Edited April 8, 2016 by Guest Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 ممكن تكون المشكله اني عامل الزر و الايديت في tab? Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 ممكن تكون المشكله اني عامل الزر و الايديت في tab? Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 GUIEditor.edit[1] = guiCreateEdit(14, 341, 386, 33, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(406, 341, 144, 35, "Send", false, GUIEditor.tab[1]) Link to comment
Adham Posted April 8, 2016 Author Share Posted April 8, 2016 GUIEditor.edit[1] = guiCreateEdit(14, 341, 386, 33, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(406, 341, 144, 35, "Send", false, GUIEditor.tab[1]) Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 غير اسم الزر في سطر 4 وغير اسم الايدت في سطر 6 Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 غير اسم الزر في سطر 4 وغير اسم الايدت في سطر 6 Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 ما ظبت @ debugscript 3 وش يطلع به Link to comment
Abdul KariM Posted April 8, 2016 Share Posted April 8, 2016 ما ظبت @ debugscript 3 وش يطلع به 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