..:D&G:.. Posted June 11, 2016 Share Posted June 11, 2016 So I saved some RGB color codes as an element data to each player like this: setElementData(thePlayer, "color", "255, 255, 255"). How can I unpack that and use it in "tocolor" in a dxDrawRectangle? I can't unpack that because it is a string... Any ideas? Thanks. Link to comment
roaddog Posted June 11, 2016 Share Posted June 11, 2016 https://wiki.multitheftauto.com/wiki/split Link to comment
Anubhav Posted June 11, 2016 Share Posted June 11, 2016 use tables. setElementData( bblablabla, "your_value", {r,g,b}) then you can use: unpack( getElementData ( blablabla, "your_value ) ) Link to comment
..:D&G:.. Posted June 11, 2016 Author Share Posted June 11, 2016 I used JSON for this and it works now. 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