1LoL1 Posted May 12, 2014 Posted May 12, 2014 Hey, how do I put these hexes away? I tried it 4 hours and did not know anyone advise? --Name statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..getPlayerName(getLocalPlayer()) ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name") guiSetText(statsLabel["name"],"Name: "..getPlayerName(getLocalPlayer()))
1LoL1 Posted May 12, 2014 Author Posted May 12, 2014 I tried it but somehow it does not .. :gsub("#% x% x% x% x% x% x", "") string.gsub(getPlayerName(getLocalPlayer()), "#% x% x% x% x% x% x "," ")
-.Paradox.- Posted May 12, 2014 Posted May 12, 2014 getPlayerName(player):gsub ( "#%x%x%x%x%x%x", "" )
1LoL1 Posted May 12, 2014 Author Posted May 12, 2014 getPlayerName(player):gsub ( "#%x%x%x%x%x%x", "" ) Yet how many times do I have to write that this is what I have tried everything possible that if you put the entire post so it can go ..
#RooTs Posted May 12, 2014 Posted May 12, 2014 local name = getPlayerName(localPlayer):gsub('#%x%x%x%x%x%x', '') statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..name ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name")
1LoL1 Posted May 13, 2014 Author Posted May 13, 2014 local name = getPlayerName(localPlayer):gsub('#%x%x%x%x%x%x', '') statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..name ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name") But however it is again differently ... and it does not work ..
Karuzo Posted May 13, 2014 Posted May 13, 2014 --Name local namenohex = string.gsub ( getPlayerName ( source ), '#%x%x%x%x%x%x', '' ) statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..namenohex ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name")
1LoL1 Posted May 13, 2014 Author Posted May 13, 2014 --Name local namenohex = string.gsub ( getPlayerName ( source ), '#%x%x%x%x%x%x', '' ) statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..namenohex ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name") Now it does not show up there at all :(I'll give the whole post?
1LoL1 Posted May 13, 2014 Author Posted May 13, 2014 I used this but when I changed the name so I changed it .. local namenohex = string.gsub ( getPlayerName(getLocalPlayer()), '#%x%x%x%x%x%x', '' ) statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..namenohex ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name")
Castillo Posted May 13, 2014 Posted May 13, 2014 You mean that you want it to update when you change your nick? if so, you must use the onClientPlayerChangeNick event.
1LoL1 Posted May 13, 2014 Author Posted May 13, 2014 You mean that you want it to update when you change your nick? if so, you must use the onClientPlayerChangeNick event. And you could not write it through out my post? thus making it difficult to even know what I do there what are you wrote ?
Castillo Posted May 13, 2014 Posted May 13, 2014 There's an example of how to use that event in the wiki page: https://wiki.multitheftauto.com/wiki/onC ... ChangeNick You have to use the function guiSetText to update the name in the label.
1LoL1 Posted May 13, 2014 Author Posted May 13, 2014 There's an example of how to use that event in the wiki page:https://wiki.multitheftauto.com/wiki/onC ... ChangeNick You have to use the function guiSetText to update the name in the label. So just this? AddEventHandler ("onClientPlayerChangeNick" getLocalPlayer ()
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