0 Üye ve 1 Ziyaretçi konuyu incelemekte.
addEvent("colorchat",true)addEventHandler("colorchat",root,function()openPicker( "chatrenk",(getElementData(localPlayer,"chatrenk") or "#FFFFFF"), "Chat Rengi Seç" )end)addEvent ("onColorPickerOK", true )addEventHandler ("onColorPickerOK", root,function ( id, hex, r, g, b ) if ( id == "chatrenk" ) then setElementData(localPlayer,"chatrenk",hex) outputChatBox("* Chat Renk: "..hex)endend)
addEventHandler("onPlayerQuit",root,function() serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then fileDelete(serial..".txt") end local newFile = fileCreate(serial..".txt") if newFile then fileWrite(newFile, getElementData(source,"chatrenk") or "#FFFFFF") fileClose(newFile) end end) addEventHandler("onPlayerJoin",root,function() serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then local buffer while not fileIsEOF(openFile) do buffer = fileRead(openFile, 500) if buffer then--and getPlayerName(source) ~= buffer then setElementData(source,"chatrenk",buffer) --outputChatBox("* "..buffer.." #cc0000adlı oyuncu nickini #cc0000"..getPlayerName(source).." #cc0000olarak değiştirdi.",root,200,0,0,true) end end end fileClose(openFile) end) local chatTime = {} local lastChatMessage = {} addEventHandler('onPlayerChat', root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + 500 > getTickCount() then outputChatBox("Stop spamming main chat!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end if lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) return else lastChatMessage[source] = msg end if getElementData(source,"chatrenk") then local r, g, b = getPlayerNametagColor(source) local cr = getElementData(source,"chatrenk") outputChatBox(getPlayerName(source) .. ': '..cr..msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) return end local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end)addCommandHandler("chatrengi",function(player,cmd)triggerClientEvent(player,"colorchat",player)end)
addEventHandler("onPlayerQuit",root,function() serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then fileDelete(serial..".txt") end local newFile = fileCreate(serial..".txt") if newFile then fileWrite(newFile, getElementData(source,"chatrenk") or "#FFFFFF") fileClose(newFile) end end)function displayLoadedRes ( res ) for i, player in ipairs(getElementsByType("player")) do bindKey ( player, "F2", "down", chatrengi ) endendaddEventHandler ( "onResourceStart", getRootElement(), displayLoadedRes ) addEventHandler("onPlayerJoin",root,function() bindKey ( source, "F2", "down", chatrengi ) serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then local buffer while not fileIsEOF(openFile) do buffer = fileRead(openFile, 500) if buffer then--and getPlayerName(source) ~= buffer then setElementData(source,"chatrenk",buffer) --outputChatBox("* "..buffer.." #cc0000adlı oyuncu nickini #cc0000"..getPlayerName(source).." #cc0000olarak değiştirdi.",root,200,0,0,true) end end end fileClose(openFile) end) local chatTime = {} local lastChatMessage = {} addEventHandler('onPlayerChat', root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + 500 > getTickCount() then outputChatBox("Stop spamming main chat!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end if lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) return else lastChatMessage[source] = msg end if getElementData(source,"chatrenk") then local r, g, b = getPlayerNametagColor(source) local cr = getElementData(source,"chatrenk") outputChatBox(getPlayerName(source) .. ': '..cr..msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) return end local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end) function chatrengi(player,cmd)triggerClientEvent(player,"colorchat",player)end)addCommandHandler("chatrengi",chatrengi)
addEventHandler("onPlayerQuit",root,function() serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then fileDelete(serial..".txt") end local newFile = fileCreate(serial..".txt") if newFile then fileWrite(newFile, getElementData(source,"chatrenk") or "#FFFFFF") fileClose(newFile) end end) function displayLoadedRes ( res ) for i, player in ipairs(getElementsByType("player")) do bindKey ( player, "F2", "down", chatrengi ) endendaddEventHandler ( "onResourceStart", getRootElement(), displayLoadedRes ) addEventHandler("onPlayerJoin",root,function() bindKey ( source, "F2", "down", chatrengi ) serial = getPlayerSerial(source) local openFile = fileOpen(serial..".txt") if openFile then local buffer while not fileIsEOF(openFile) do buffer = fileRead(openFile, 500) if buffer then--and getPlayerName(source) ~= buffer then setElementData(source,"chatrenk",buffer) --outputChatBox("* "..buffer.." #cc0000adlı oyuncu nickini #cc0000"..getPlayerName(source).." #cc0000olarak değiştirdi.",root,200,0,0,true) end end end fileClose(openFile) end) local chatTime = {} local lastChatMessage = {} addEventHandler('onPlayerChat', root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + 500 > getTickCount() then outputChatBox("Stop spamming main chat!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end if lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) return else lastChatMessage[source] = msg end if getElementData(source,"chatrenk") then local r, g, b = getPlayerNametagColor(source) local cr = getElementData(source,"chatrenk") outputChatBox(getPlayerName(source) .. ': '..cr..msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) return end local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg, root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end) function chatrengi(player,cmd)triggerClientEvent(player,"colorchat",player)endaddCommandHandler("chatrengi",chatrengi)
tamam oldu ama geri kapanmiyor onun ile ilgili bilgin varmı kardeş
function getVisiblePicker(id) if id and pickerTable[id] then return true end return falseend
addEvent("colorchat",true)addEventHandler("colorchat",root,function()if getVisiblePicker("chatrenk")==false thenopenPicker( "chatrenk",(getElementData(localPlayer,"chatrenk") or "#FFFFFF"), "Chat Rengi Seç" )elseclosePicker("chatrenk")endend) addEvent ("onColorPickerOK", true )addEventHandler ("onColorPickerOK", root,function ( id, hex, r, g, b ) if ( id == "chatrenk" ) then setElementData(localPlayer,"chatrenk",hex) outputChatBox("* Chat Renk: "..hex)endend)