OrrutoSCR Posted December 23, 2019 Share Posted December 23, 2019 O que devo fazer para que apareça o country de todos os jogadores do servidor e tbm que faça eu tirar os nomes colorido do meu scoreboard ? Link to comment
Tommy. Posted December 23, 2019 Share Posted December 23, 2019 Para remover a cor você vai usar a função: function removeHex (s) if type (s) == "string" then while (s ~= s:gsub ("#%x%x%x%x%x%x", "")) do s = s:gsub ("#%x%x%x%x%x%x", "") end end return s or false end Para colocar a bandeira do país você seta ela quando ele logar. dai é só criar o dxDrawImage com o elementData function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) 1 Link to comment
DNL291 Posted December 23, 2019 Share Posted December 23, 2019 https://community.multitheftauto.com/index.php?p=resources&s=details&id=10435 1 Link to comment
OrrutoSCR Posted December 23, 2019 Author Share Posted December 23, 2019 4 hours ago, Tommy. said: Para remover a cor você vai usar a função: function removeHex (s) if type (s) == "string" then while (s ~= s:gsub ("#%x%x%x%x%x%x", "")) do s = s:gsub ("#%x%x%x%x%x%x", "") end end return s or false end Para colocar a bandeira do país você seta ela quando ele logar. dai é só criar o dxDrawImage com o elementData function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) Já tentei com essa função ai Tommy, e sobre a bandeira só n tava aparecendo porque eu tava no servidor local rs 2 hours ago, DNL291 said: https://community.multitheftauto.com/index.php?p=resources&s=details&id=10435 Vlw mano Link to comment
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