..:D&G:.. Posted June 11, 2016 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. MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
roaddog Posted June 11, 2016 Posted June 11, 2016 https://wiki.multitheftauto.com/wiki/split You gone learn today. I work my ass off, but I still can't pay tho.
Anubhav Posted June 11, 2016 Posted June 11, 2016 use tables. setElementData( bblablabla, "your_value", {r,g,b}) then you can use: unpack( getElementData ( blablabla, "your_value ) ) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
..:D&G:.. Posted June 11, 2016 Author Posted June 11, 2016 I used JSON for this and it works now. MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
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