Some issues:
On line 58, you create a (default) 10-minute timer and pass a client index as the timer's parameter. When using timers or asynchronous callbacks, you need to pass the client's user ID (
GetClientUserId) or serial (
GetClientSerial), and use
GetClientOfUserId or
GetClientFromSerial to get a client index out of it. By passing a client index, if the client disconnects before the timer elapses, someone else might take their slot and be improperly kicked.
Your else statement on line 83 is pointless.
Your IsValidTeam stock is unnecessarily complex. You can just check if the client's team == 0 and return false. Or, for minimum lines of code:
PHP Code:
bool:IsValidTeam(client) {
return (GetClientTeam(client) != 0);
}
__________________