0 Üye ve 1 Ziyaretçi konuyu incelemekte.
root = getRootElement()function center(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)endaddEventHandler("onClientResourceStart", resourceRoot, function() window = guiCreateWindow(320, 266, 758, 621, "Degistir", false) center(window) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible(window, false) playerList = guiCreateGridList(9, 29, 173, 576, false, window) nick = guiCreateLabel(202, 64, 216, 18, "Nick:", false, window) guiSetFont(nick, "default-bold-small") mutedurum = guiCreateLabel(202, 121, 216, 18, "Mute Durumu:", false, window) guiSetFont(mutedurum, "default-bold-small") hg1 = guiCreateButton(202, 246, 216, 52, "Hoşgörüsüz 1 = 5 Dakika", false, window) guiSetFont(hg1, "default-bold-small") guiSetProperty(hg1, "NormalTextColour", "FFFFFFFF") hg2 = guiCreateButton(202, 327, 216, 52, "Hoşgörüsüz 2 = 10 Dakika", false, window) guiSetFont(hg2, "default-bold-small") guiSetProperty(hg2, "NormalTextColour", "FFFFFFFF") hg3 = guiCreateButton(202, 403, 216, 52, "Hoşgörüsüz 3 = 15 Dakika", false, window) guiSetFont(hg3, "default-bold-small") guiSetProperty(hg3, "NormalTextColour", "FFFFFFFF") hg4 = guiCreateButton(202, 484, 216, 52, "Hoşgörüsüz 4 = Kick", false, window) guiSetFont(hg4, "default-bold-small") guiSetProperty(hg4, "NormalTextColour", "FFFFFFFF") hgisim = guiCreateLabel(241, 215, 149, 17, "Hoşgörüsüz", false, window) guiSetFont(hgisim, "default-bold-small") guiLabelSetHorizontalAlign(hgisim, "center", false) al1 = guiCreateButton(518, 246, 216, 52, "Ailevi 1 = 10 Dakika", false, window) guiSetFont(al1, "default-bold-small") guiSetProperty(al1, "NormalTextColour", "FFFFFFFF") al2 = guiCreateButton(518, 327, 216, 52, "Ailevi 2 = 20 Dakika", false, window) guiSetFont(al2, "default-bold-small") guiSetProperty(al2, "NormalTextColour", "FFFFFFFF") al3 = guiCreateButton(518, 403, 216, 52, "Ailevi 3 = 30 Dakika", false, window) guiSetFont(al3, "default-bold-small") guiSetProperty(al3, "NormalTextColour", "FFFFFFFF") al4 = guiCreateButton(518, 484, 216, 52, "Ailevi 4 = 1 Saat Ban", false, window) guiSetFont(al4, "default-bold-small") guiSetProperty(al4, "NormalTextColour", "FFFFFFFF") alisim = guiCreateLabel(555, 212, 149, 17, "Ailevi", false, window) guiSetFont(alisim, "default-bold-small") guiLabelSetHorizontalAlign(alisim, "center", false) end)-----function createPlayerList () -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, string.gsub(getPlayerName( playeritem ), "#%x%x%x%x%x%x", ""), false, false) end addEventHandler ( "onClientGUIClick", playerList, click ) endendaddEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList )function click ( button, state, sx, sy, x, y, z, elem, gui ) -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then -- get the player name from the selected row, first column local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox ( playerName ) -- output it to chat box endend-------function guiOpen() if (guiGetVisible(window) == true) then --Check whether gui is visible or not guiSetVisible(window, false) --if visible then close it showCursor(false) else guiSetVisible(window, true) --if not open it showCursor(true) end end bindKey("o", "down", guiOpen) --bind F2 for that function -------
addEventHandler ( "onClientGUIClick", root,function () if source == susturbutonu then local row,col = guiGridListGetSelectedItem(Oyuncular) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(Oyuncular, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu) else -- eğer seçili değilse herhangi bir lsiteden bişey outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end endend)
addEvent("muteAt", true)addEventHandler("muteAt", root, function(Oyuncular) setPlayerMuted(Oyuncular, true) outputChatBox(getPlayerName(source).." isimli yetkili " ..getPlayerName(Oyuncular).." susturdu.", root, 0,255,0, true)end)
ClientServer
-- CLİENT SİDE --gridlist_degisken_adi = guiCreateGridList(0, 0, 0, 0, false)guiGridListAddColumn(gridlist_degisken_adi, "Oyuncu Listesi", 0.9)function oyunculari_listeye_ekle()guiGridListClear(gridlist_degisken_adi)for i,Oyuncular in ipairs(getElementsByType("player")) doOyuncular1 = getLocalPlayer()row = guiGridListAddRow(gridlist_degisken_adi)if Oyuncular ~= Oyuncular1 thenguiGridListSetItemText (gridlist_degisken_adi,row,1,(string.gsub (getPlayerName(Oyuncular), "#%x%x%x%x%x%x", "")), false, false)guiGridListSetItemData (gridlist_degisken_adi,row,1, getPlayerName(Oyuncular))guiGridListSetSortingEnabled(gridlist_degisken_adi, false)guiGridListSetItemText (gridlist_degisken_adi,row,1,(string.gsub (getPlayerName(Oyuncular), "#%x%x%x%x%x%x", "")), false, false)guiGridListSetItemData (gridlist_degisken_adi,row,1, getPlayerName(Oyuncular))guiGridListSetSortingEnabled(gridlist_degisken_adi, false)endendaddEventHandler ( "onClientGUIChanged", root,oyunculari_listeye_ekle)addEventHandler("onClientGUIClick",root,function()if source == buton_degisken_adi then local row,col = guiGridListGetSelectedItem( gridlist_degisken_adi ) if row and col and row ~= -1 and col ~= -1 then local liste_item_sec = guiGridListGetItemData(gridlist_degisken_adi, row, 1) triggerServerEvent("Oyuncuya_mute_at", localPlayer, liste_item_sec)else outputChatBox("Lütfen listeden bir oyuncu seçiniz!", 255,0,0,true) end endend)
-- AYARLAR --Element = rootdakika = 30-- KODLAR SERVER SİDE --addEvent("Oyuncuya_mute_at", true)addEventHandler("Oyuncuya_mute_at", root,function ( kisi )dakika_ = dakika*60000setPlayerMuted(kisi, true)outputChatBox(getPlayerName(source).."Adlı yetkili " ..getPlayerName(kisi).."Adlı oyuncuyu susturdu -"..dakika_.." Dakika", Element, 0,255,0, true)setTimer(mute_ac, dakika_, 1, source)end)function mute_ac(oyuncu)setPlayerMuted(oyuncu, false )outputChatBox ("#FFFFFF"..getPlayerName(oyuncu).." #00ff00 Cezan bitti birdaha tekrarlama!",Element, 255, 255, 0,true )end)
Ailevi küfürlerde ban atılacak değil mi ?
Buyur;Client.sideKod: lua-- CLİENT SİDE --gridlist_degisken_adi = guiCreateGridList(0, 0, 0, 0, false)guiGridListAddColumn(gridlist_degisken_adi, "Oyuncu Listesi", 0.9)function oyunculari_listeye_ekle()guiGridListClear(gridlist_degisken_adi)for i,Oyuncular in ipairs(getElementsByType("player")) doOyuncular1 = getLocalPlayer()row = guiGridListAddRow(gridlist_degisken_adi)if Oyuncular ~= Oyuncular1 thenguiGridListSetItemText (gridlist_degisken_adi,row,1,(string.gsub (getPlayerName(Oyuncular), "#%x%x%x%x%x%x", "")), false, false)guiGridListSetItemData (gridlist_degisken_adi,row,1, getPlayerName(Oyuncular))guiGridListSetSortingEnabled(gridlist_degisken_adi, false)guiGridListSetItemText (gridlist_degisken_adi,row,1,(string.gsub (getPlayerName(Oyuncular), "#%x%x%x%x%x%x", "")), false, false)guiGridListSetItemData (gridlist_degisken_adi,row,1, getPlayerName(Oyuncular))guiGridListSetSortingEnabled(gridlist_degisken_adi, false)endendaddEventHandler ( "onClientGUIChanged", root,oyunculari_listeye_ekle)addEventHandler("onClientGUIClick",root,function()if source == buton_degisken_adi then local row,col = guiGridListGetSelectedItem( gridlist_degisken_adi ) if row and col and row ~= -1 and col ~= -1 then local liste_item_sec = guiGridListGetItemData(gridlist_degisken_adi, row, 1) triggerServerEvent("Oyuncuya_mute_at", localPlayer, liste_item_sec)else outputChatBox("Lütfen listeden bir oyuncu seçiniz!", 255,0,0,true) end endend)Server.sideKod: lua-- AYARLAR --Element = rootdakika = 30-- KODLAR SERVER SİDE --addEvent("Oyuncuya_mute_at", true)addEventHandler("Oyuncuya_mute_at", root,function ( kisi )dakika_ = dakika*60000setPlayerMuted(kisi, true)outputChatBox(getPlayerName(source).."Adlı yetkili " ..getPlayerName(kisi).."Adlı oyuncuyu susturdu -"..dakika_.." Dakika", Element, 0,255,0, true)setTimer(mute_ac, dakika_, 1, source)end)function mute_ac(oyuncu)setPlayerMuted(oyuncu, false )outputChatBox ("#FFFFFF"..getPlayerName(oyuncu).." #00ff00 Cezan bitti birdaha tekrarlama!",Element, 255, 255, 0,true )end)Denemedim hata çıkarsa yazarsın Kadir düzelttiğin için teşekkür ederim
root = getRootElement() function center(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 addEventHandler("onClientResourceStart", resourceRoot, function() window = guiCreateWindow(320, 266, 758, 621, "Degistir", false) center(window) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible(window, false) playerList = guiCreateGridList(9, 29, 173, 576, false, window) nick = guiCreateLabel(202, 64, 216, 18, "Nick:", false, window) guiSetFont(nick, "default-bold-small") mutedurum = guiCreateLabel(202, 121, 216, 18, "Mute Durumu:", false, window) guiSetFont(mutedurum, "default-bold-small") hg1 = guiCreateButton(202, 246, 216, 52, "Hoşgörüsüz 1 = 5 Dakika", false, window) guiSetFont(hg1, "default-bold-small") guiSetProperty(hg1, "NormalTextColour", "FFFFFFFF") hg2 = guiCreateButton(202, 327, 216, 52, "Hoşgörüsüz 2 = 10 Dakika", false, window) guiSetFont(hg2, "default-bold-small") guiSetProperty(hg2, "NormalTextColour", "FFFFFFFF") hg3 = guiCreateButton(202, 403, 216, 52, "Hoşgörüsüz 3 = 15 Dakika", false, window) guiSetFont(hg3, "default-bold-small") guiSetProperty(hg3, "NormalTextColour", "FFFFFFFF") hg4 = guiCreateButton(202, 484, 216, 52, "Hoşgörüsüz 4 = Kick", false, window) guiSetFont(hg4, "default-bold-small") guiSetProperty(hg4, "NormalTextColour", "FFFFFFFF") hgisim = guiCreateLabel(241, 215, 149, 17, "Hoşgörüsüz", false, window) guiSetFont(hgisim, "default-bold-small") guiLabelSetHorizontalAlign(hgisim, "center", false) al1 = guiCreateButton(518, 246, 216, 52, "Ailevi 1 = 10 Dakika", false, window) guiSetFont(al1, "default-bold-small") guiSetProperty(al1, "NormalTextColour", "FFFFFFFF") al2 = guiCreateButton(518, 327, 216, 52, "Ailevi 2 = 20 Dakika", false, window) guiSetFont(al2, "default-bold-small") guiSetProperty(al2, "NormalTextColour", "FFFFFFFF") al3 = guiCreateButton(518, 403, 216, 52, "Ailevi 3 = 30 Dakika", false, window) guiSetFont(al3, "default-bold-small") guiSetProperty(al3, "NormalTextColour", "FFFFFFFF") al4 = guiCreateButton(518, 484, 216, 52, "Ailevi 4 = 1 Saat Ban", false, window) guiSetFont(al4, "default-bold-small") guiSetProperty(al4, "NormalTextColour", "FFFFFFFF") alisim = guiCreateLabel(555, 212, 149, 17, "Ailevi", false, window) guiSetFont(alisim, "default-bold-small") guiLabelSetHorizontalAlign(alisim, "center", false) end) ----- function createPlayerList () -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, string.gsub(getPlayerName( playeritem ), "#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemData(playerList, row,column, playeritem) end addEventHandler ( "onClientGUIClick", playerList, click ) endendaddEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList ) function click ( button, state, sx, sy, x, y, z, elem, gui ) -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then -- get the player name from the selected row, first column local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox ( playerName ) -- output it to chat box endend ------- function guiOpen() if (guiGetVisible(window) == true) then --Check whether gui is visible or not guiSetVisible(window, false) --if visible then close it showCursor(false) else guiSetVisible(window, true) --if not open it showCursor(true) end end bindKey("o", "down", guiOpen) --bind F2 for that function --ButonlaraddEventHandler ( "onClientGUIClick", root,function () if source == hg1 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,1) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg2 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,10) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg3 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,15) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg4 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("kickAt", localPlayer, oyuncu,"Hoşgörüsüz") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al1 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.15,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al2 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.2,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al3 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.25,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al4 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,1,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end endend)
zaman = 60000addEvent("muteAt", true)addEventHandler("muteAt", root, function(Oyuncular,sure) setPlayerMuted(Oyuncular, true) setTimer ( muteAc, (sure*zaman), 1, source) outputChatBox(getPlayerName(source).." isimli yetkili " ..getPlayerName(Oyuncular).."adlı oyuncuyu susturdu.", root, 0,255,0, true)end)function muteAc (player) if (isElement (player) and isPlayerMuted (player)) then setPlayerMuted (player, false ) outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #bbfa00 artık konuşabilirsin. ",getRootElement(), 255, 255, 0,true ) endendaddEvent("kickAt", true)addEventHandler("kickAt", root, function(Oyuncular,sebep) kickPlayer ( Oyuncular, source, sebep ) outputChatBox("#FFFFFF"..getPlayerName(Oyuncular).."#FF0000adlı oyuncu "..getPlayerName(source).." tarafından kicklendi.", root, 255,255,255,true)end)addEvent("banAt", true)addEventHandler("banAt", root, function(Oyuncular,sure,sebep) banPlayer(Oyuncular,true,false,true,source,sebep,sure) outputChatBox("#FFFFFF"..getPlayerName(Oyuncular).."#FF0000adlı oyuncu "..getPlayerName(source).." tarafından banlandı. #FFFFFF[Sebep :"..sebep.."]", root, 255,255,255,true)end)
function center(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 window = guiCreateWindow(320, 266, 758, 621, "Degistir", false) center(window) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible(window, false) playerList = guiCreateGridList(9, 29, 173, 576, false, window) column = guiGridListAddColumn( playerList, "Player", 0.85 ) nick = guiCreateLabel(202, 64, 216, 18, "Nick:", false, window) guiSetFont(nick, "default-bold-small") mutedurum = guiCreateLabel(202, 121, 216, 18, "Mute Durumu:", false, window) guiSetFont(mutedurum, "default-bold-small") hg1 = guiCreateButton(202, 246, 216, 52, "Hoşgörüsüz 1 = 5 Dakika", false, window) guiSetFont(hg1, "default-bold-small") guiSetProperty(hg1, "NormalTextColour", "FFFFFFFF") hg2 = guiCreateButton(202, 327, 216, 52, "Hoşgörüsüz 2 = 10 Dakika", false, window) guiSetFont(hg2, "default-bold-small") guiSetProperty(hg2, "NormalTextColour", "FFFFFFFF") hg3 = guiCreateButton(202, 403, 216, 52, "Hoşgörüsüz 3 = 15 Dakika", false, window) guiSetFont(hg3, "default-bold-small") guiSetProperty(hg3, "NormalTextColour", "FFFFFFFF") hg4 = guiCreateButton(202, 484, 216, 52, "Hoşgörüsüz 4 = Kick", false, window) guiSetFont(hg4, "default-bold-small") guiSetProperty(hg4, "NormalTextColour", "FFFFFFFF") hgisim = guiCreateLabel(241, 215, 149, 17, "Hoşgörüsüz", false, window) guiSetFont(hgisim, "default-bold-small") guiLabelSetHorizontalAlign(hgisim, "center", false) al1 = guiCreateButton(518, 246, 216, 52, "Ailevi 1 = 10 Dakika", false, window) guiSetFont(al1, "default-bold-small") guiSetProperty(al1, "NormalTextColour", "FFFFFFFF") al2 = guiCreateButton(518, 327, 216, 52, "Ailevi 2 = 20 Dakika", false, window) guiSetFont(al2, "default-bold-small") guiSetProperty(al2, "NormalTextColour", "FFFFFFFF") al3 = guiCreateButton(518, 403, 216, 52, "Ailevi 3 = 30 Dakika", false, window) guiSetFont(al3, "default-bold-small") guiSetProperty(al3, "NormalTextColour", "FFFFFFFF") al4 = guiCreateButton(518, 484, 216, 52, "Ailevi 4 = 1 Saat Ban", false, window) guiSetFont(al4, "default-bold-small") guiSetProperty(al4, "NormalTextColour", "FFFFFFFF") alisim = guiCreateLabel(555, 212, 149, 17, "Ailevi", false, window) guiSetFont(alisim, "default-bold-small") guiLabelSetHorizontalAlign(alisim, "center", false) function createPlayerList() for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText( playerList, row, column, string.gsub(getPlayerName( playeritem ), "#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemData(playerList, row, column, playeritem) endend addEventHandler("onClientGUIClick", resourceRoot, function() if seciliKisiCek() then if source == hg1 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 1, "Mute") elseif source == hg2 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 10, "Mute") elseif source == hg3 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 15, "Mute") elseif source == hg4 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), _, "Kick") elseif source == al1 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 10, "Mute") elseif source == al2 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 20, "Mute") elseif source == al3 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 30, "Mute") elseif source == al4 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 3600, "Ban") -- 3600 = 1 saat (saniye olarak) end else outputChatBox("Lütfen listeden bir kişi seç.", 255,0,0, true) end end) function seciliKisiCek() local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then secilenKisi = guiGridListGetItemData ( playerList, row, 1 ) else return false end return secilenKisiend function guiOpen() if (guiGetVisible(window) == true) then --Check whether gui is visible or not guiSetVisible(window, false) --if visible then close it showCursor(false) else guiSetVisible(window, true) --if not open it showCursor(true) createPlayerList() end end bindKey("o", "down", guiOpen) --bind F2 for that function
addEvent("CezaVer", true)addEventHandler("CezaVer", root, function(oyuncu, sure, olay) if olay == "Mute" then setPlayerMuted(oyuncu, true) outputChatBox(getPlayerName(oyuncu).. " #FFFFFFİsimli oyuncu #cc0000"..sure.." #FFFFFFdakika susturuldu", root, 0,255,0, true) setTimer(muteKaldir, 60000*sure,1, oyuncu) elseif olay == "Kick" then kickPlayer ( oyuncu, source, "Hosgorusuz davrandıgın icin kick" ) elseif olay == "Ban" then banPlayer(oyuncu, true, false, true, source, "Ailevi küfürden dolayı banlandın", sure ) endend)function muteKaldir(oyuncu) if isElement(oyuncu) then if isPlayerMuted(oyuncu) then setPlayerMuted(oyuncu, false) outputChatBox(getPlayerName(oyuncu).. " Artık konuşabilirsin.", root, 0,255,0, true) end endend
Kopyala yapıştır direk kafan karışmasın diye tümünü attımEğer mahlukat benden sonra atarsa onunkini kullan Kod: luaroot = getRootElement() function center(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 addEventHandler("onClientResourceStart", resourceRoot, function() window = guiCreateWindow(320, 266, 758, 621, "Degistir", false) center(window) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible(window, false) playerList = guiCreateGridList(9, 29, 173, 576, false, window) nick = guiCreateLabel(202, 64, 216, 18, "Nick:", false, window) guiSetFont(nick, "default-bold-small") mutedurum = guiCreateLabel(202, 121, 216, 18, "Mute Durumu:", false, window) guiSetFont(mutedurum, "default-bold-small") hg1 = guiCreateButton(202, 246, 216, 52, "Hoşgörüsüz 1 = 5 Dakika", false, window) guiSetFont(hg1, "default-bold-small") guiSetProperty(hg1, "NormalTextColour", "FFFFFFFF") hg2 = guiCreateButton(202, 327, 216, 52, "Hoşgörüsüz 2 = 10 Dakika", false, window) guiSetFont(hg2, "default-bold-small") guiSetProperty(hg2, "NormalTextColour", "FFFFFFFF") hg3 = guiCreateButton(202, 403, 216, 52, "Hoşgörüsüz 3 = 15 Dakika", false, window) guiSetFont(hg3, "default-bold-small") guiSetProperty(hg3, "NormalTextColour", "FFFFFFFF") hg4 = guiCreateButton(202, 484, 216, 52, "Hoşgörüsüz 4 = Kick", false, window) guiSetFont(hg4, "default-bold-small") guiSetProperty(hg4, "NormalTextColour", "FFFFFFFF") hgisim = guiCreateLabel(241, 215, 149, 17, "Hoşgörüsüz", false, window) guiSetFont(hgisim, "default-bold-small") guiLabelSetHorizontalAlign(hgisim, "center", false) al1 = guiCreateButton(518, 246, 216, 52, "Ailevi 1 = 10 Dakika", false, window) guiSetFont(al1, "default-bold-small") guiSetProperty(al1, "NormalTextColour", "FFFFFFFF") al2 = guiCreateButton(518, 327, 216, 52, "Ailevi 2 = 20 Dakika", false, window) guiSetFont(al2, "default-bold-small") guiSetProperty(al2, "NormalTextColour", "FFFFFFFF") al3 = guiCreateButton(518, 403, 216, 52, "Ailevi 3 = 30 Dakika", false, window) guiSetFont(al3, "default-bold-small") guiSetProperty(al3, "NormalTextColour", "FFFFFFFF") al4 = guiCreateButton(518, 484, 216, 52, "Ailevi 4 = 1 Saat Ban", false, window) guiSetFont(al4, "default-bold-small") guiSetProperty(al4, "NormalTextColour", "FFFFFFFF") alisim = guiCreateLabel(555, 212, 149, 17, "Ailevi", false, window) guiSetFont(alisim, "default-bold-small") guiLabelSetHorizontalAlign(alisim, "center", false) end) ----- function createPlayerList () -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, string.gsub(getPlayerName( playeritem ), "#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemData(playerList, row,column, playeritem) end addEventHandler ( "onClientGUIClick", playerList, click ) endendaddEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList ) function click ( button, state, sx, sy, x, y, z, elem, gui ) -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then -- get the player name from the selected row, first column local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox ( playerName ) -- output it to chat box endend ------- function guiOpen() if (guiGetVisible(window) == true) then --Check whether gui is visible or not guiSetVisible(window, false) --if visible then close it showCursor(false) else guiSetVisible(window, true) --if not open it showCursor(true) end end bindKey("o", "down", guiOpen) --bind F2 for that function --ButonlaraddEventHandler ( "onClientGUIClick", root,function () if source == hg1 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,1) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg2 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,10) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg3 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("muteAt", localPlayer, oyuncu,15) else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == hg4 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("kickAt", localPlayer, oyuncu,"Hoşgörüsüz") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al1 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.15,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al2 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.2,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al3 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,0.25,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end elseif source == al4 then local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then local oyuncu = guiGridListGetItemData(playerList, row, 1) triggerServerEvent("banAt", localPlayer, oyuncu,1,"Ailevi Küfür") else outputChatBox("Lütfen bir oyuncu seçiniz!", 255,0,0) end endend)Kod: luazaman = 60000addEvent("muteAt", true)addEventHandler("muteAt", root, function(Oyuncular,sure) setPlayerMuted(Oyuncular, true) setTimer ( muteAc, (sure*zaman), 1, source) outputChatBox(getPlayerName(source).." isimli yetkili " ..getPlayerName(Oyuncular).."adlı oyuncuyu susturdu.", root, 0,255,0, true)end)function muteAc (player) if (isElement (player) and isPlayerMuted (player)) then setPlayerMuted (player, false ) outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #bbfa00 artık konuşabilirsin. ",getRootElement(), 255, 255, 0,true ) endendaddEvent("kickAt", true)addEventHandler("kickAt", root, function(Oyuncular,sebep) kickPlayer ( Oyuncular, source, sebep ) outputChatBox("#FFFFFF"..getPlayerName(Oyuncular).."#FF0000adlı oyuncu "..getPlayerName(source).." tarafından kicklendi.", root, 255,255,255,true)end)addEvent("banAt", true)addEventHandler("banAt", root, function(Oyuncular,sure,sebep) banPlayer(Oyuncular,true,false,true,source,sebep,sure) outputChatBox("#FFFFFF"..getPlayerName(Oyuncular).."#FF0000adlı oyuncu "..getPlayerName(source).." tarafından banlandı. #FFFFFF[Sebep :"..sebep.."]", root, 255,255,255,true)end)
sec begen al xdclientKod: luafunction center(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 window = guiCreateWindow(320, 266, 758, 621, "Degistir", false) center(window) guiWindowSetMovable(window, false) guiWindowSetSizable(window, false) guiSetVisible(window, false) playerList = guiCreateGridList(9, 29, 173, 576, false, window) column = guiGridListAddColumn( playerList, "Player", 0.85 ) nick = guiCreateLabel(202, 64, 216, 18, "Nick:", false, window) guiSetFont(nick, "default-bold-small") mutedurum = guiCreateLabel(202, 121, 216, 18, "Mute Durumu:", false, window) guiSetFont(mutedurum, "default-bold-small") hg1 = guiCreateButton(202, 246, 216, 52, "Hoşgörüsüz 1 = 5 Dakika", false, window) guiSetFont(hg1, "default-bold-small") guiSetProperty(hg1, "NormalTextColour", "FFFFFFFF") hg2 = guiCreateButton(202, 327, 216, 52, "Hoşgörüsüz 2 = 10 Dakika", false, window) guiSetFont(hg2, "default-bold-small") guiSetProperty(hg2, "NormalTextColour", "FFFFFFFF") hg3 = guiCreateButton(202, 403, 216, 52, "Hoşgörüsüz 3 = 15 Dakika", false, window) guiSetFont(hg3, "default-bold-small") guiSetProperty(hg3, "NormalTextColour", "FFFFFFFF") hg4 = guiCreateButton(202, 484, 216, 52, "Hoşgörüsüz 4 = Kick", false, window) guiSetFont(hg4, "default-bold-small") guiSetProperty(hg4, "NormalTextColour", "FFFFFFFF") hgisim = guiCreateLabel(241, 215, 149, 17, "Hoşgörüsüz", false, window) guiSetFont(hgisim, "default-bold-small") guiLabelSetHorizontalAlign(hgisim, "center", false) al1 = guiCreateButton(518, 246, 216, 52, "Ailevi 1 = 10 Dakika", false, window) guiSetFont(al1, "default-bold-small") guiSetProperty(al1, "NormalTextColour", "FFFFFFFF") al2 = guiCreateButton(518, 327, 216, 52, "Ailevi 2 = 20 Dakika", false, window) guiSetFont(al2, "default-bold-small") guiSetProperty(al2, "NormalTextColour", "FFFFFFFF") al3 = guiCreateButton(518, 403, 216, 52, "Ailevi 3 = 30 Dakika", false, window) guiSetFont(al3, "default-bold-small") guiSetProperty(al3, "NormalTextColour", "FFFFFFFF") al4 = guiCreateButton(518, 484, 216, 52, "Ailevi 4 = 1 Saat Ban", false, window) guiSetFont(al4, "default-bold-small") guiSetProperty(al4, "NormalTextColour", "FFFFFFFF") alisim = guiCreateLabel(555, 212, 149, 17, "Ailevi", false, window) guiSetFont(alisim, "default-bold-small") guiLabelSetHorizontalAlign(alisim, "center", false) function createPlayerList() for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText( playerList, row, column, string.gsub(getPlayerName( playeritem ), "#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemData(playerList, row, column, playeritem) endend addEventHandler("onClientGUIClick", resourceRoot, function() if seciliKisiCek() then if source == hg1 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 1, "Mute") elseif source == hg2 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 10, "Mute") elseif source == hg3 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 15, "Mute") elseif source == hg4 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), _, "Kick") elseif source == al1 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 10, "Mute") elseif source == al2 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 20, "Mute") elseif source == al3 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 30, "Mute") elseif source == al4 then triggerServerEvent("CezaVer", localPlayer, seciliKisiCek(), 3600, "Ban") -- 3600 = 1 saat (saniye olarak) end else outputChatBox("Lütfen listeden bir kişi seç.", 255,0,0, true) end end) function seciliKisiCek() local row,col = guiGridListGetSelectedItem(playerList) if row and col and row ~= -1 and col ~= -1 then secilenKisi = guiGridListGetItemData ( playerList, row, 1 ) else return false end return secilenKisiend function guiOpen() if (guiGetVisible(window) == true) then --Check whether gui is visible or not guiSetVisible(window, false) --if visible then close it showCursor(false) else guiSetVisible(window, true) --if not open it showCursor(true) createPlayerList() end end bindKey("o", "down", guiOpen) --bind F2 for that function server.luaKod: luaaddEvent("CezaVer", true)addEventHandler("CezaVer", root, function(oyuncu, sure, olay) if olay == "Mute" then setPlayerMuted(oyuncu, true) outputChatBox(getPlayerName(oyuncu).. " #FFFFFFİsimli oyuncu #cc0000"..sure.." #FFFFFFdakika susturuldu", root, 0,255,0, true) setTimer(muteKaldir, 60000*sure,1, oyuncu) elseif olay == "Kick" then kickPlayer ( oyuncu, source, "Hosgorusuz davrandıgın icin kick" ) elseif olay == "Ban" then banPlayer(oyuncu, true, false, true, source, "Ailevi küfürden dolayı banlandın", sure ) endend)function muteKaldir(oyuncu) if isElement(oyuncu) then if isPlayerMuted(oyuncu) then setPlayerMuted(oyuncu, false) outputChatBox(getPlayerName(oyuncu).. " Artık konuşabilirsin.", root, 0,255,0, true) end endend Scripte yetki vermeyi unutma