BorderLine Posted September 27, 2011 Posted September 27, 2011 Hi comunity. Well im a new user in forum. and i decide register because i learn much reading the forum's post. In special solidnake and JR10 you helpme so much Well i have a problem, i dont know if this is good or not. I want remove hex code from pm chat window function removeHEXFromString(str) return str:gsub("#%x%x%x%x%x%x", "") end i dont know if i need put some "IF" or other fuction I maked much changes, but i cant doit and sorry for my english.. i hope you can understan what i need here i have a img Thanks Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
MTA Team qaisjp Posted September 27, 2011 MTA Team Posted September 27, 2011 getPlayerName:gsub("#%x%x%x%x%x%x", "") when looping players
BorderLine Posted September 27, 2011 Author Posted September 27, 2011 getPlayerName:gsub("#%x%x%x%x%x%x", "") when looping players ill test it Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
TwiX! Posted September 27, 2011 Posted September 27, 2011 maybe.. -- remove color coding from string function removeColorCoding (name) return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name end -- getPlayerName with color coding removed local _getPlayerName = getPlayerName function getPlayerName(player) if type(player) == "string" then return removeColorCoding(player) end return removeColorCoding (_getPlayerName(player)) end - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
BorderLine Posted September 27, 2011 Author Posted September 27, 2011 maybe.. -- remove color coding from string function removeColorCoding (name) return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name end -- getPlayerName with color coding removed local _getPlayerName = getPlayerName function getPlayerName(player) if type(player) == "string" then return removeColorCoding(player) end return removeColorCoding (_getPlayerName(player)) end aaaaaah you are the best man now is fix thanks alot..!!!! if some mod read this can be closed this post all are okey Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
TwiX! Posted September 27, 2011 Posted September 27, 2011 np:) - Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]
RaceXtreme Posted September 27, 2011 Posted September 27, 2011 Just didnt understood a thing... return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name -- what is this? is like "if" structure? how this works in lua scripting? ... local _getPlayerName = getPlayerName -- this is a hook of getPlayerName? how this works? its to dosent call the costum function below? function getPlayerName(player) -- we can make a function with a native MTA one? Thanks in advance RaceXtreme
Castillo Posted September 27, 2011 Posted September 27, 2011 RaceXtreme, what Qwert did is replace the original getPlayerName with his own, so, yeah, it's possible. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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