#Mr.alkmasha Posted November 25, 2014 Share Posted November 25, 2014 اسلام عليكم ابي فنكشات اول ما اكتب كلمه باليديت تيجي بلقريد لست يعني اكتبها و اضغط على زر بوتون Link to comment
iPrestege Posted November 25, 2014 Share Posted November 25, 2014 addEventHandler 'onClientGUIClick' guiCreateButton guiCreateGridList guiGridListAddRow guiGridListAddColumn guiCreateEdit guiGetText guiGridListSetItemText Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 وش المشكله ب ذا الكود؟ --Client addEventHandler("onClientGUIClick",root,function () if ( source == ButtonSendMsgOnSupport ) then local Text = guiGetText(EditMessage) if ( Text and Text ~= "" and Text ~= " " ) then triggerServerEvent("onSendMsg",localPlayer,Text) guiSetText(EditMessage,"") else outputChatBox("* Please Write Text",255,0,0,true) end elseif ( source == ButtonSendMsgOnSupport) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) guiSetInputEnabled(false) end end) --Server addEvent("onSendMsg",true) addEventHandler("onSendMsg", root, function(Text) local Text = getPlayerName(client):gsub("#%x%x%x%x%x%x","").." : "..Text local support1 = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)),aclGetGroup("Support")) for i,v in ipairs (getElementsByType("player")) do local support2 = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)),aclGetGroup("Support")) if support1 then triggerClientEvent(v, "onGotMsg", client, Text) elseif support2 or v == client then triggerClientEvent(v, "onGotMsg", client, Text, support2) end end end) Link to comment
EH10 Posted November 25, 2014 Share Posted November 25, 2014 # By The Best Edit EH10 . #Client . addEventHandler('onClientGUIClick',root,function () local row, col = guiGridListGetSelectedItem(GridList) local name = guiGridListGetItemText(GridList,row,1) local EH10 = guiGridListGetItemText(GridList,row,2) if ( source == Button ) then local plr = guiGetText(GridList) local add = guiGetText(GridList) triggerServerEvent('Save',localPlayer, plr,add) end end ) addEvent ( 'AddDataName', true ) addEventHandler ( 'AddDataName', root,function (plr,add) local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( , row, 1,tostring ( plr ), false, false ) guiGridListSetItemText ( GridList, row, 2,tostring ( add ), false, false ) end ) addEvent ( 'AddName', true ) addEventHandler ( 'AddName', root,function ( onClientSqlList ) guiGridListClear ( GridList ) for _, v in ipairs ( onClientSqlList ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText (GridList, row, 1, tostring ( v.plr ), false, false ) guiGridListSetItemText (GridList, row, 2, tostring ( v.add ), false, false ) end end ) #Server . addEventHandler ( 'onResourceStart', resourceRoot,function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS `AddSystem` (add,plr)" ) outputDebugString("SQL Data Base Started!",0,0,255,0,0) end ) function setSQL_Data ( add , plr) return executeSQLQuery ( "INSERT INTO `AddSystem` ( `add`, `plr` ) VALUES ( ?,? )", tostring(add),tostring(plr) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM `AddSystem`" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data; end end function UpDateListInSql ( element ) if ( not isElement ( element ) ) then return; end local Upsql = SelectFromSql ( ) triggerClientEvent ( element, "AddName", element, Upsql ) end addEvent ( 'Save', true ) addEventHandler ( 'Save', root,function (add,plr) setSQL_Data (add,plr) triggerClientEvent ( root, "AddDataName", root,add,plr ) end ) addEvent ( 'Refresh', true ) addEventHandler ( 'Refresh', root,function ( ) UpDateListInSql ( source ) end ) Link to comment
#DRAGON!FIRE Posted November 25, 2014 Share Posted November 25, 2014 @ EH10 : وش تهلوس الله يهديكـ ؟ ليه السكل والتريقرات ومدري وشو ؟ Link to comment
EH10 Posted November 25, 2014 Share Posted November 25, 2014 @ EH10 : وش تهلوس الله يهديكـ ؟ ليه السكل والتريقرات ومدري وشو ؟ الله يـهديك يـقدر , يعدلة وأنا أعطيتة الكـود , . وعدلت اشياء . Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 ما زبط + وش لازمة السكل؟؟ Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 ياخي كودك الي حطيته مو زابط Link to comment
EH10 Posted November 25, 2014 Share Posted November 25, 2014 ياخي كودك الي حطيته مو زابط اإنا قلت شي ؟ ماتبي نعدل كودك , بكيفك Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 وش المشكله ب ذا الكود؟--Client addEventHandler("onClientGUIClick",root,function () if ( source == ButtonSendMsgOnSupport ) then local Text = guiGetText(EditMessage) if ( Text and Text ~= "" and Text ~= " " ) then triggerServerEvent("onSendMsg",localPlayer,Text) guiSetText(EditMessage,"") else outputChatBox("* Please Write Text",255,0,0,true) end elseif ( source == ButtonSendMsgOnSupport) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) guiSetInputEnabled(false) end end) --Server addEvent("onSendMsg",true) addEventHandler("onSendMsg", root, function(Text) local Text = getPlayerName(client):gsub("#%x%x%x%x%x%x","").." : "..Text local support1 = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)),aclGetGroup("Support")) for i,v in ipairs (getElementsByType("player")) do local support2 = isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)),aclGetGroup("Support")) if support1 then triggerClientEvent(v, "onGotMsg", client, Text) elseif support2 or v == client then triggerClientEvent(v, "onGotMsg", client, Text, support2) end end end) انا طارحه من الاول Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 وين باقي الكلينت؟ addEvent("onAddPlayers",true) addEventHandler("onAddPlayers",root,function (name) guiGridListClear(GUIEditor.gridlist[1]) local Row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], Row, 1, name, false, false ) guiSetEnabled(GUIEditor.button[1], true) end) addEvent("onGotMsg",true) addEventHandler("onGotMsg", root, function (Text, support) local Row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2], Row, 1, Text, false, false) if source ~= localPlayer and support then outputChatBox("* Support - System : You Got a New Message",255,255,0,true) end end) Link to comment
TAPL Posted November 25, 2014 Share Posted November 25, 2014 ايوا و ايش الي ما يشتغل؟ Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 يوم اكتب ب الايديت كلمه و احط send ما يصير شي ما تيجي الكتابه بالقريد ليست Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 ما يطلع شي Link to comment
TAPL Posted November 25, 2014 Share Posted November 25, 2014 ؟ButtonSendMsgOnSupport متأكد ان اسم متغير الزر elseif و ليه حاط لنفس الزر Link to comment
#Mr.alkmasha Posted November 25, 2014 Author Share Posted November 25, 2014 ؟ButtonSendMsgOnSupport متأكد ان اسم متغير الزرelseif و ليه حاط لنفس الزر يب متأكد وحاطط ذي عشان لما اضغط الزر تغلق الوحه Link to comment
The Killer Posted November 25, 2014 Share Posted November 25, 2014 جرب كذا Client side # addEventHandler("onClientGUIClick", root, function () if ( source == ButtonSendMsgOnSupport ) then local Text = guiGetText(EditMessage) if ( Text and Text ~= "" and Text ~= " " ) then triggerServerEvent("onSendMsg",localPlayer,Text) guiSetText(EditMessage,"") guiSetVisible(GUIEditor.window[1], false) showCursor(false) guiSetInputEnabled(false) else outputChatBox("* Please Write Text", 255, 0, 0, true) end end end ) addEvent("onGotMsg", true) addEventHandler("onGotMsg", root, function (Name, Text) local Row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2], Row, 1, Name .. ": " .. Text, false, false) outputChatBox("* Support - System : You Got a New Message", 255, 255, 0, true) end ) Server side # addEvent ("onSendMsg", true) addEventHandler ("onSendMsg", root, function (text) local name = getPlayerName(client):gsub("#%x%x%x%x%x%x","") if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)), aclGetGroup("Support")) then for _,v in ipairs (getElementsByType ("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("Support")) then triggerClientEvent(v, "onGotMsg", v, name, text) end end end end ) Link to comment
#Mr.alkmasha Posted November 26, 2014 Author Share Posted November 26, 2014 زبط بس ممكن تعطني اذا يكون معاه رتبه معينه يطلع اسمه ب لون Link to comment
The Killer Posted November 26, 2014 Share Posted November 26, 2014 function # isObjectInACLGroup getAccountName getPlayerAccount aclGetGroup function # guiGridListSetItemColor Link to comment
#Mr.alkmasha Posted November 26, 2014 Author Share Posted November 26, 2014 ما زبط --Client addEventHandler("onClientGUIClick",root,function () if ( source == GUIEditor.button[1] ) then guiGridListSetItemColor ( GUIEditor.gridlist[2], row, column, 255, 0, 255 ) triggerServerEvent("ss",localPlayer,column) end end ) --Server addEvent("ss",true) addEventHandler("ss",root,function () if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)),aclGetGroup("Support")) ) then end end) 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