I’m working on a mod that changes a player’s color for a short time, and then changes it back. I’m trying to learn LUA for gmod.
I start by creating an array of all players and props on the map.
I then store the color of each player/prop
The issue is this, I populate a color from an entity using the following code:
local c = v:GetColor() local r,g,b,a = c.r, c.g, c.b, c.a print("RGBA: " .. r .. g .. b .. a )
That color SHOULD be 255, 255, 255, 255 because none of the colors have been modified yet. The problem I have is I keep getting
255, 0, 255, 255 in that print line. BUT sometimes I DO get 255, 255, 255, 255. What the heck is going on here?
Wouldn’t all props/players have their color set to 255,255,255,255 by default?
EDIT: Here’s what the console spits out:
RGBA: 2550255255 RGBA: 2550255255 RGBA: 255255255255 RGBA: 2550255255 RGBA: 2550255255 RGBA: 2550255255 RGBA: 2550255255