SaedAmer Posted June 24, 2016 Share Posted June 24, 2016 السلام عليكم عاوز لما احط تاج من مود ما يكرر مع ود التاجات و لما احط تاق كمان ون مود اخر ما يكرر مع المود الاول و المود التاني Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Share Posted June 24, 2016 بعطيك اقتراح سوي لما يشتري تاج من مود يعطيه داتا وسوي بمود التاجات لما شخص يكتب شيئ بالشات ان كان يملك الداتا يكنسل الايفينت فقط ان ما عرفت ضع اكواد مود التاج ومود شراء تاج Link to comment
SaedAmer Posted June 24, 2016 Author Share Posted June 24, 2016 (edited) ده كود سيرفر حق مود الكونسول يعطي التاج addEventHandler('onPlayerChat',root, function ( msg ) cancelEvent ( ) local Player_Name , Data = getPlayerName ( source ) , getElementData(source,'Data_Tag') outputChatBox("#FF0000 * #FFFFFF[ #CD0000"..Data.."#FFFFFF ]x #A5A5A5"..Player_Name..":#CD0000 "..msg.."", root , 255 , 255 ,255 ,true) end ) executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Data_S` (Serial, Data) ' ) function onSave( ) local checkData = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) local Data = getElementData(source,'Data_Tag') if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Data_S` (Serial, Data) VALUES(?, ?) ', getPlayerSerial(source), Data) else local Data = getElementData(source,'Data_Tag') executeSQLQuery( ' UPDATE`Data_S` SET Serial = ?, Data = ? ', getPlayerSerial(source), Data) end end addEventHandler('onPlayerQuit',getRootElement(),onSave) addEventHandler('onPlayerLogout',getRootElement(),onSave) addEventHandler( 'onPlayerJoin', root, function( ) local Save = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) if ( type ( Save ) == 'table' and #Save == 0 or not Save ) then return end setElementData(source,'Data_Tag',Save[1]['Data']) end ) كلنت function guiGridListGetSelectedItemText ( gridList, column ) local item = guiGridListGetSelectedItem ( gridList ) local text = guiGridListGetItemText ( gridList, item, column or 1 ) if ( text ~= '' ) then return text else return false end end function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end function SetWindowVisible ( Panel , StatsP , StatsC ) guiSetVisible( Panel , StatsP) showCursor( StatsC ) centerWindow( Panel ) end local screenW, screenH = guiGetScreenSize() Tag_Window = guiCreateWindow((screenW - 353) / 2, (screenH - 285) / 2, 353, 285, "Tags System", false) guiWindowSetSizable(Tag_Window, false) guiSetVisible(Tag_Window,false) Tag_GridList = guiCreateGridList(10, 24, 332, 207, false, Tag_Window) Tag_Column = guiGridListAddColumn(Tag_GridList, "Players", 0.9) Tag_Edit = guiCreateEdit(9, 240, 260, 24, "", false, Tag_Window) Tag_Buuton_G = guiCreateButton(273, 240, 69, 24, "Give Tag", false, Tag_Window) guiSetFont(Tag_Buuton_G, "default-bold-small") guiSetFont(Tag_GridList, "default-bold-small") addCommandHandler('TagPanel', function ( ) guiGridListClear ( Tag_GridList ) for _,Value in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( Tag_GridList ) guiGridListSetItemText ( Tag_GridList, Row, Tag_Column, getPlayerName ( Value ), false, false ) guiGridListSetItemColor(Tag_GridList,Row,1,math.random(0,255),math.random(0,255),math.random(0,255)) SetWindowVisible ( Tag_Window , not guiGetVisible(Tag_Window) , not guiGetVisible(Tag_Window) ) end end ) addEventHandler('onClientGUIClick',Tag_Buuton_G, function ( ) local Selected , Tag_Name = guiGridListGetSelectedItemText ( Tag_GridList, Tag_Column ) , guiGetText(Tag_Edit) if ( Tag_Name ~= ' ' ) or ( Tag_Name ~= '' ) and ( guiGridListGetSelectedItem (Tag_GridList) ~= -1 ) then local Plr = getPlayerFromName(Selected) setElementData(Plr,'Data_Tag',Tag_Name) outputChatBox("#FFFFFF[Tag System] #53CE41 ", root , 255 , 255 ,255 ,true) end end , false ) ده كود سيرفر حق العب يعطي نفسه تاج في الرنت كلنت addEventHandler("onClientGUIClick",root,function() if(source == GUIEditor.button[9]) 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[10]) then setElementData (localPlayer,'tag',false) setElementData (localPlayer,'colour',false) end end) سيرفر addEventHandler("onPlayerChat",root,function (msg,Colour) local tag = getElementData(source,"tag") or '#FF0000[#005588Player#FF0000]' local colour = getElementData(source,"colour") or '#FFFFFF' outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end) ده مود التاجات addEventHandler("onPlayerChat", root, playerChat) addEvent("onPlayeropenChat",true) addEventHandler("onPlayeropenChat",root,function () removeElementData(resourceRoot,"chat") end) addEvent("onPlayerCloseChat",true) addEventHandler("onPlayerCloseChat",root,function () setElementData (resourceRoot, "chat",true) end) ------ addEventHandler("onPlayerChat",root, function( text, type) if type == 1 or type == 2 then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) else end if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) end end ) Edited June 24, 2016 by Guest Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Share Posted June 24, 2016 ده كود سيرفر حق مود الكونسول يعطي التاج addEventHandler('onPlayerChat',root, function ( msg ) cancelEvent ( ) local Player_Name , Data = getPlayerName ( source ) , getElementData(source,'Data_Tag') outputChatBox("#FF0000 * #FFFFFF[ #CD0000"..Data.."#FFFFFF ]x #A5A5A5"..Player_Name..":#CD0000 "..msg.."", root , 255 , 255 ,255 ,true) end ) executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Data_S` (Serial, Data) ' ) function onSave( ) local checkData = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) local Data = getElementData(source,'Data_Tag') if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Data_S` (Serial, Data) VALUES(?, ?) ', getPlayerSerial(source), Data) else local Data = getElementData(source,'Data_Tag') executeSQLQuery( ' UPDATE`Data_S` SET Serial = ?, Data = ? ', getPlayerSerial(source), Data) end end addEventHandler('onPlayerQuit',getRootElement(),onSave) addEventHandler('onPlayerLogout',getRootElement(),onSave) addEventHandler( 'onPlayerJoin', root, function( ) local Save = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) if ( type ( Save ) == 'table' and #Save == 0 or not Save ) then return end setElementData(source,'Data_Tag',Save[1]['Data']) end ) ده كود سيرفر حق العب يعطي نفسه تاج في الرنت addEventHandler("onPlayerChat",root,function (msg,Colour) local tag = getElementData(source,"tag") or '#FF0000[#005588Player#FF0000]' local colour = getElementData(source,"colour") or '#FFFFFF' outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end) ده مود التاجات addEventHandler("onPlayerChat", root, playerChat) addEvent("onPlayeropenChat",true) addEventHandler("onPlayeropenChat",root,function () removeElementData(resourceRoot,"chat") end) addEvent("onPlayerCloseChat",true) addEventHandler("onPlayerCloseChat",root,function () setElementData (resourceRoot, "chat",true) end) ------ addEventHandler("onPlayerChat",root, function( text, type) if type == 1 or type == 2 then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) else end if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) end end ) جرب addEventHandler("onPlayerChat", root, playerChat) addEvent("onPlayeropenChat",true) addEventHandler("onPlayeropenChat",root,function () removeElementData(resourceRoot,"chat") end) addEvent("onPlayerCloseChat",true) addEventHandler("onPlayerCloseChat",root,function () setElementData (resourceRoot, "chat",true) end) ------ addEventHandler("onPlayerChat",root, function( text, type) if getElementData(source,"Data_Tag") then return end if type == 1 or type == 2 then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) else end if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) end end ) Link to comment
SaedAmer Posted June 24, 2016 Author Share Posted June 24, 2016 ده كود سيرفر حق مود الكونسول يعطي التاج addEventHandler('onPlayerChat',root, function ( msg ) cancelEvent ( ) local Player_Name , Data = getPlayerName ( source ) , getElementData(source,'Data_Tag') outputChatBox("#FF0000 * #FFFFFF[ #CD0000"..Data.."#FFFFFF ]x #A5A5A5"..Player_Name..":#CD0000 "..msg.."", root , 255 , 255 ,255 ,true) end ) executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Data_S` (Serial, Data) ' ) function onSave( ) local checkData = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) local Data = getElementData(source,'Data_Tag') if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Data_S` (Serial, Data) VALUES(?, ?) ', getPlayerSerial(source), Data) else local Data = getElementData(source,'Data_Tag') executeSQLQuery( ' UPDATE`Data_S` SET Serial = ?, Data = ? ', getPlayerSerial(source), Data) end end addEventHandler('onPlayerQuit',getRootElement(),onSave) addEventHandler('onPlayerLogout',getRootElement(),onSave) addEventHandler( 'onPlayerJoin', root, function( ) local Save = executeSQLQuery( ' SELECT * FROM `Data_S` WHERE Serial = ? ', getPlayerSerial(source) ) if ( type ( Save ) == 'table' and #Save == 0 or not Save ) then return end setElementData(source,'Data_Tag',Save[1]['Data']) end ) كلنت function guiGridListGetSelectedItemText ( gridList, column ) local item = guiGridListGetSelectedItem ( gridList ) local text = guiGridListGetItemText ( gridList, item, column or 1 ) if ( text ~= '' ) then return text else return false end end function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end function SetWindowVisible ( Panel , StatsP , StatsC ) guiSetVisible( Panel , StatsP) showCursor( StatsC ) centerWindow( Panel ) end local screenW, screenH = guiGetScreenSize() Tag_Window = guiCreateWindow((screenW - 353) / 2, (screenH - 285) / 2, 353, 285, "Tags System", false) guiWindowSetSizable(Tag_Window, false) guiSetVisible(Tag_Window,false) Tag_GridList = guiCreateGridList(10, 24, 332, 207, false, Tag_Window) Tag_Column = guiGridListAddColumn(Tag_GridList, "Players", 0.9) Tag_Edit = guiCreateEdit(9, 240, 260, 24, "", false, Tag_Window) Tag_Buuton_G = guiCreateButton(273, 240, 69, 24, "Give Tag", false, Tag_Window) guiSetFont(Tag_Buuton_G, "default-bold-small") guiSetFont(Tag_GridList, "default-bold-small") addCommandHandler('TagPanel', function ( ) guiGridListClear ( Tag_GridList ) for _,Value in next, getElementsByType ( "player" ) do local Row = guiGridListAddRow ( Tag_GridList ) guiGridListSetItemText ( Tag_GridList, Row, Tag_Column, getPlayerName ( Value ), false, false ) guiGridListSetItemColor(Tag_GridList,Row,1,math.random(0,255),math.random(0,255),math.random(0,255)) SetWindowVisible ( Tag_Window , not guiGetVisible(Tag_Window) , not guiGetVisible(Tag_Window) ) end end ) addEventHandler('onClientGUIClick',Tag_Buuton_G, function ( ) local Selected , Tag_Name = guiGridListGetSelectedItemText ( Tag_GridList, Tag_Column ) , guiGetText(Tag_Edit) if ( Tag_Name ~= ' ' ) or ( Tag_Name ~= '' ) and ( guiGridListGetSelectedItem (Tag_GridList) ~= -1 ) then local Plr = getPlayerFromName(Selected) setElementData(Plr,'Data_Tag',Tag_Name) outputChatBox("#FFFFFF[Tag System] #53CE41 ", root , 255 , 255 ,255 ,true) end end , false ) ده كود سيرفر حق العب يعطي نفسه تاج في الرنت كلنت addEventHandler("onClientGUIClick",root,function() if(source == GUIEditor.button[9]) 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[10]) then setElementData (localPlayer,'tag',false) setElementData (localPlayer,'colour',false) end end) سيرفر addEventHandler("onPlayerChat",root,function (msg,Colour) local tag = getElementData(source,"tag") or '#FF0000[#005588Player#FF0000]' local colour = getElementData(source,"colour") or '#FFFFFF' outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) return cancelEvent() end) ده مود التاجات addEventHandler("onPlayerChat", root, playerChat) addEvent("onPlayeropenChat",true) addEventHandler("onPlayeropenChat",root,function () removeElementData(resourceRoot,"chat") end) addEvent("onPlayerCloseChat",true) addEventHandler("onPlayerCloseChat",root,function () setElementData (resourceRoot, "chat",true) end) ------ addEventHandler("onPlayerChat",root, function( text, type) if type == 1 or type == 2 then return end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) else end if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) end end ) Link to comment
taha201100 Posted June 24, 2016 Share Posted June 24, 2016 وعليكم السلام اخوي كتابتك لعنواين المواضيع خاطئه راجع موضوع الأخ كور وضع طلبك بالعنوان سواء طلب او مساعده Link to comment
Mr.CoR Posted June 24, 2016 Share Posted June 24, 2016 + موضوعك مكرر يرجى من المشرفين أرشفة الموضوع 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