Et-win Posted June 13, 2014 Posted June 13, 2014 addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox(getPlayerName(source) .. '(CLAN)' .. msg:gsub('#%x%x%x%x%x%x', ''), playerData, r, g, b, true) end end end ) Too bored to explain, sorry guys x3
-.Paradox.- Posted June 13, 2014 Posted June 13, 2014 (edited) i need ready made please because i tried every thing Edited June 14, 2014 by Guest
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 (edited) addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox(getPlayerName(source) .. '(CLAN)' .. msg:gsub('#%x%x%x%x%x%x', ''), playerData, r, g, b, true) end end end ) Too bored to explain, sorry guys x3 This No Effect Edited June 14, 2014 by Guest
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 i need ready made please because i tried every thing local function onplayerChat ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) local red, green, blue = getPlayerNametagColor ( source ) local hex = RGBToHex ( red, green, blue ) local members = getPlayersInTeam( team ) or {} for _, player in ipairs(members) do outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) end outputServerLog( "(TEAM): " .. name .. ": " .. message ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) For you Nikolai itsnot Working at all its not showing any thing , i mean itsnot showing (CLAN) OR (TEAM) it makes space in outputChatBox Heeeeeeeeeeeelp
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Help i tried Those In Client Side And Server Side and No Effect
Et-win Posted June 14, 2014 Posted June 14, 2014 You don't even know what you are doing or what? You say there are absolutly no debugescript 3 error? It actually gives the error that RGBToHex is a nil value, in other words: This code/function was not found. Also, it doesn't give any 'space' to the chatbox, because that error is given. You said you tried everything, but you don't even know what you are doing!
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 (edited) You don't even know what you are doing or what? You say there are absolutly no debugescript 3 error? It actually gives the error that RGBToHex is a nil value, in other words: This code/function was not found. Also, it doesn't give any 'space' to the chatbox, because that error is given. You said you tried everything, but you don't even know what you are doing! I told you. And spider since you don't know how to use it then no need to help you... onPlayerChat is serverside. Add this to your code. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end Edited June 14, 2014 by Guest
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 your script isn't working you gave me my posted script again ! iam asking for help if you want okay if you don't so go away
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Nikolai i know that its in Server Side itsn't showing (CLAN) it shows (TEAM) local function onplayerChat ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) local red, green, blue = getPlayerNametagColor ( source ) local hex = RGBToHex ( red, green, blue ) local members = getPlayersInTeam( team ) or {} for _, player in ipairs(members) do outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) end outputServerLog( "(TEAM): " .. name .. ": " .. message ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) This is in Server Side but no effect
Et-win Posted June 14, 2014 Posted June 14, 2014 your script isn't working you gave me my posted script again ! iam asking for help if you want okay if you don't so go away Lol, why it does work on my server then? It gives me an error, and totally no output in the chatbox. Is the script even started, lol?
Max+ Posted June 14, 2014 Posted June 14, 2014 Try This , function onplayerChat ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) red ,green ,blue = getTeamColor(getPlayerTeam(source)) outputChatBox( "#FFFFFF(CLAN)" .. red, green, blue.." "..name .. ":#FFFFFF" .. message, source, 255, 255, 255, true ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) Make sure you dont start gamemode play in server try test it with deathmatch gamemode or race ,
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 your script isn't working you gave me my posted script again ! iam asking for help if you want okay if you don't so go away Stop blaming him, It's nof his fault, It's yours because you don't know how to fix it or ateast just tell what does debug say. Read my post again.
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 Try This , function onplayerChat ( message, messageType ) if ( messageType == 2 ) then cancelEvent ( ) local name = getPlayerName ( source ) red ,green ,blue = getTeamColor(getPlayerTeam(source)) outputChatBox( "#FFFFFF(CLAN)" .. red, green, blue.." "..name .. ":#FFFFFF" .. message, source, 255, 255, 255, true ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) Make sure you dont start gamemode play in server try test it with deathmatch gamemode or race , Where is the loop for team members?
Et-win Posted June 14, 2014 Posted June 14, 2014 addEventHandler('onPlayerChat', getRootElement(), function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox("(CLAN)"..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) end end end ) Here.
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 Add this to my old code. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 OmG finally it works thank you very much guys
Et-win Posted June 14, 2014 Posted June 14, 2014 OmG finally it works thank you very much guys Good, but by your next script I'm not going to help you anymore. Unless you are not bothered with posting what debugscript 3 says and you look by yourself into the code's of yourself and ours. Try to actually learn from it.
Max+ Posted June 14, 2014 Posted June 14, 2014 OmG finally it works thank you very much guys you really need to know how to script , trust me , it's not that hard if you have a littel bit of english language , Don't expect others to help you in the next days , , ,
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 OmG finally it works thank you very much guys Good, but by your next script I'm not going to help you anymore. Unless you are not bothered with posting what debugscript 3 says and you look by yourself into the code's of yourself and ours. Try to actually learn from it. Also me. As far as i know him he will post back that it's not working or something.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Hahahahah Nah but i have another question on that i put the Green Color Code Before the CLAN , but Every thing changes to green i wanna just the Clan be Green, itsn't important if you don't want to tell me addEventHandler('onPlayerChat', getRootElement(), function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox("#00FF00(CLAN)"..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) end end end )
Et-win Posted June 14, 2014 Posted June 14, 2014 Hahahahah Nah but i have another question on that i put the Green Color Code Before the CLAN , but Every thing changes to green i wanna just the Clan be Green, itsn't important if you don't want to tell me code Now you can compare Nikolai96's code from RGBToHex with this one. Good luck.
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 Hahahahah Nah but i have another question on that i put the Green Color Code Before the CLAN , but Every thing changes to green i wanna just the Clan be Green, itsn't important if you don't want to tell me code Now you can compare Nikolai96's code from RGBToHex with this one. Good luck. OmG finally it works thank you very much guys Good, but by your next script I'm not going to help you anymore. Unless you are not bothered with posting what debugscript 3 says and you look by yourself into the code's of yourself and ours. Try to actually learn from it. Also me. As far as i know him he will post back that it's not working or something. Told you ;D Then use what i posted before.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Like that addEventHandler('onPlayerChat', getRootElement(), function(msg, type) if type == 2 then cancelEvent() local r, g, b = getPlayerNametagColor(source) for placeNumber, playerData in ipairs(getPlayersInTeam(getPlayerTeam(source))) do outputChatBox("#FF0000(CLAN)"..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) end end end ) function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end
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