What is wrong with this?
Code:
public Action:Event_PlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (IsFakeClient(client))
{
return;
}
// some code
}
Error:
Code:
[SM] Native "IsFakeClient" reported: Client index 0 is invalid
[SM] Displaying call stack trace for plugin "test-plugin.smx":
[SM] [0] Line 64, /home/groups/sourcemod/upload_tmp/phpRz9Q5o.sp::Event_PlayerTeam()
Tried to add function that prints to chat current client value for diagnostic but it tells me 21 (not 0).