Hello
I try to get a players color, but I just get some strange numbers
I use:
Code:
new offset = GetEntSendPropOffs(client, "m_clrRender", true);
and then:
Code:
GetEntData(client, offset) Red
GetEntData(client, offset +1) // Green
GetEntData(client, offset +2) // Blue
GetEntData(client, offset +3) // Alpha
And here are what i get:
Code:
Red -1 | Green 822083583 | Blue 1546715135 | Alpha -2
Here are the full code:
Code:
#include <sourcemod>
#pragma semicolon 1
public Plugin:myinfo =
{
name = "Test script",
author = "KK",
description = "Test script",
version = "0.1",
url = "http://www.attack2.co.cc/"
};
public OnPluginStart()
{
RegConsoleCmd("sm_mycolor", Command_MyColor);
}
public Action:Command_MyColor(client, args)
{
new offset = GetEntSendPropOffs(client, "m_clrRender", true);
PrintToChat(client, "You color are Red %i | Green %i | Blue %i | Alpha %i ", GetEntData(client, offset), GetEntData(client, offset + 1), GetEntData(client, offset + 2), GetEntData(client, offset + 3));
}
Edit: Solution
here