manve1 Posted September 16, 2012 Posted September 16, 2012 Is there any way i can disable color codes like "#00ff00" in grid lists? Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted September 16, 2012 Posted September 16, 2012 Use: string:gsub ( "#%x%x%x%x%x%x", "" ) When setting the row text. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted September 16, 2012 Author Posted September 16, 2012 sorry Solidsnake14, but i don't really know how to use that thing u wrote is it possible u can re-make my script? function playerList() local Grid = guiCreateGridList( 0.05, 0.1, 0.25, 0.8, true, Wnd ) local Column = guiGridListAddColumn( Grid, "Player", 0.85 ) if ( Column ) then for id, player in ipairs(getElementsByType("player")) do local Row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, Row, Column, getPlayerName ( player ), false, false ) end end end setTimer( playerList, 100, 0 ) addEventHandler("onClientResourceStart", root, playerList) Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted September 16, 2012 Posted September 16, 2012 getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted September 16, 2012 Author Posted September 16, 2012 thank you very much. Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted September 16, 2012 Posted September 16, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TAPL Posted September 16, 2012 Posted September 16, 2012 The timer here will cause for you a problems, the grid list will be created over and over you will notice that your fps will be low because of this. setTimer( playerList, 100, 0 ) and the event addEventHandler("onClientResourceStart", root, playerList) should be addEventHandler("onClientResourceStart", resourceRoot, playerList)
manve1 Posted September 16, 2012 Author Posted September 16, 2012 TAPL, i changed everything u said, and my resource just didn't put gridList, so thx for a try Looking for tutorials or information? check out: www.simpleask.co.uk
Anderl Posted September 16, 2012 Posted September 16, 2012 TAPL, i changed everything u said, and my resource just didn't put gridList, so thx for a try Actually, TAPL is right. You're creating a new gridlist with players each 100ms. You should update the player list, not create a new gridlist every 100ms. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
manve1 Posted September 17, 2012 Author Posted September 17, 2012 I know, i done that wrong, so i changed after i got answer on how to get rid of color codes Looking for tutorials or information? check out: www.simpleask.co.uk
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