So instead of making hair red, it makes another image red. Is there a way to customly set the id of each image? Or should I just make a separate file for each hair colour?
Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
How to use imagecolor for same img in diff rounds
1 reply![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
So instead of making hair red, it makes another image red. Is there a way to customly set the id of each image? Or should I just make a separate file for each hair colour?
![cs2d lua cmd](img/i_codehelp.png)
![cs2d lua cmd](img/i_codehelp.png)
NEVER use fixed IDs when working with images. It will go wrong as you noticed. Multiple objects in CS2D are sharing that ID-space so depending on what happens in the game the IDs can and will be different.
![×](img/x.gif)
1
2
2
image(....) imagecolor(1,255,0,0)
![√](img/ok.gif)
1
2
2
local id = image(....) imagecolor(id,255,0,0)
(of course you have to insert proper parameters for image instead of just "....")
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)