Hi I'm trying to recompile this plugin since it was in Russian with half of the text translated. Not only that, I'm also going to change timer values.
Code:
//// Keyman.sp
//
//Entity_pro_stocks.inc(409) : warning 209: function "GetEntityRenderColor" should return a value
//Keyman.sp(396) : error 092: number of arguments does not match definition
//Keyman.sp(398) : warning 213: tag mismatch
//Keyman.sp(1288) : error 021: symbol already defined: "GetEntityRenderColor"
//Keyman.sp(1299) : error 088: cannot return a value from a void function
//Keyman.sp(1299) : warning 213: tag mismatch
//Keyman.sp(1301) : error 088: cannot return a value from a void function
//Keyman.sp(1301) : warning 213: tag mismatch
//Keyman.sp(1288) : error 180: function return type differs from prototype. expected 'void', but got 'int'
Line 396 (Starting at 390)
Spoiler
PHP Code:
public SelectKeyman()
{
new count = 0;
new colors = 0;
new idAlive[MAXPLAYERS+1];
/* See all clients */
for (new i = 1; i <= MaxClients; i++)
{
/* is valid, in game, alive, and not bot */
if(IsValidEntity(i) && IsClientInGame(i) && IsPlayerAlive(i) && !IsFakeClient(i))
{
/* Survivor team */
if(GetClientTeam(i) == 2)
{
idAlive[count] = i;
count++;
}
}
}
for (new k = 1; k <= MaxClients; k++)
{
if(IsValidEntity(k) && IsClientInGame(k) && IsPlayerAlive(k) && !IsFakeClient(k))
{
if(GetClientTeam(k) == 2)
{
new color = GetEntityRenderColor(k)
Line 398
PHP Code:
if (color != 255255255)
{
idAlive[colors] = k;
colors++;
}
}
}
}
Line 1288
Spoiler
PHP Code:
stock GetEntityRenderColor(entity)
{
if (entity > 0)
{
new offset = GetEntSendPropOffs(entity, "m_clrRender");
new r = GetEntData(entity, offset, 1);
new g = GetEntData(entity, offset+1, 1);
new b = GetEntData(entity, offset+2, 1);
decl String:rgb[10];
Format(rgb, sizeof(rgb), "%d%d%d", r, g, b);
new color = StringToInt(rgb);
stock int ReturnEntityRenderColor(int entity) {
if (entity > 0) {
int offset = GetEntSendPropOffs(entity, "m_clrRender");
int r = GetEntData(entity, offset, 1);
int g = GetEntData(entity, offset + 1, 1);
int b = GetEntData(entity, offset + 2, 1);
char rgb[10];
Format(rgb, sizeof(rgb), "%d%d%d", r, g, b);
int color = StringToInt(rgb);
return color;
}
return 0;
}