-.Paradox.- Posted June 14, 2014 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 end return string.format("#%.2X%.2X%.2X", red, green, blue) end Hmm..No. Use my first code and add to it the RGBToHex code. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 But your first code you deleted it My nick in MTA is Spider
Et-win Posted June 14, 2014 Posted June 14, 2014 Yes, like that. Now put it in your function where you want to have the color. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
-.Paradox.- Posted June 14, 2014 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 Then what the hell is this code? huh If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 like that ??? 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("#00FF00(CLAN)"..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) end outputServerLog( "(TEAM): " .. name .. ": " .. message ) end end addEventHandler ( "onPlayerChat", root, onplayerChat ) 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 My nick in MTA is Spider
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 Yes. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Same Problem please help me i started to hate MTA because this script My nick in MTA is Spider
Et-win Posted June 14, 2014 Posted June 14, 2014 Same Problem please help me i started to hate MTA because this script If you simply let his outputChatBox in, then it did work. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 What Do you mean like that ? outputChatBox("#00FF00(CLAN)..getPlayerName(source)..":#FFFFFF "..string.gsub(msg, "#%x%x%x%x%x%x", ""), playerData, r, g, b, true) My nick in MTA is Spider
Et-win Posted June 14, 2014 Posted June 14, 2014 outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) His, not mine. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 can't you give me the full script ? My nick in MTA is Spider
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 outputChatBox( "#FFFFFF(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, player, 255, 255, 255, true ) His, not mine. Didn't notice it, I was on phone.. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted June 14, 2014 Posted June 14, 2014 (edited) If it didn't worked, don't expect from me to help you again.. Removed Edited June 14, 2014 by Guest If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
ZeyadGTX Posted June 14, 2014 Author Posted June 14, 2014 Oh finally Thanks ET-Win , Nikolai96 you are the best My nick in MTA is Spider
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