Code:
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBrodcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
if (IsValidJockey(client))
{
if (isGhostStalker)
{
GhostStalkerTimer[client] = CreateTimer(0.2, Timer_GhostStalker, client, TIMER_REPEAT);
}
if (isBacterialFeet)
{
cvarBacterialFeetTimer[client] = CreateTimer(0.5, Timer_BacterialFeet, client);
}
}
}
public Action Timer_GhostStalker(Handle timer, any client)
{
if(!IsClientMoving(client) & IsValidJockey(client) & IsValidClient(client))
{
if(Opacity >= 17)
{
Opacity-=17;
PrintToChatAll("%i", Opacity);
SetEntityRenderMode(client, RENDER_TRANSCOLOR);
SetEntityRenderColor(client, 255, 255, 255, Opacity);
for(int i=0; i<sizeof(g_JockeySounds); i++)
{
StopSound(client, -1, g_JockeySounds[i]);
}
}
}
else
{
Opacity = 255;
SetEntityRenderColor(client, 255, 255, 255, Opacity);
}
}
I made a feature for Jockey, if he's not moving for 3 seconds he will goes invisible, the problem is he still emitting sound, alert the survivor and they can also trigger voice line that detects him, also another issue is other Jockey can break invi of each other, I don't know why