Strange code.
Why do you use these events:
Code:
HookEvent("player_spawn", ScanAllClient);
HookEvent("player_death", ScanAllClient);
HookEvent("player_afk", ScanAllClient);
HookEvent("round_start", ScanAllClient);
rather than using something like OnClientConnect forward.
And why check all players together rather than concrete one.
btw, afaik, OnClientPutInServer should garantee client is in game.
Quote:
GetClientCount() will include clients as they are passed through this function, as clients are already in game at this point.
|
https://sm.alliedmods.net/new-api/cl...entPutInServer
Also, your flag parameter position is misplaced in CreateTimer function.
Also, IsClientInGame() is internally includes IsClientConnected() check.
Also, don't understand the logic, why do you need repeatable timer rather than using 1 check. It's possibly very problematic to define concrete max time because client e.g. could download additional files at the moment.
Here is a similar plugin:
https://forums.alliedmods.net/showth...=103203&page=6
__________________