Quote:
Originally Posted by Crasher_3637
One thing that I've noticed is that you keep passing the client as the data through your timers. Maybe that's why you're having clients who get other clients' bans.
You need to pass GetClientUserId(client) instead since User IDs are unique to each client. If you're only passing "client" then you could have instances where 1 player leaves and is immediately replaced by another, thus getting the ban duration of the one that just left.
Example:
PHP Code:
CreateTimer(1.0, tTimerCallback, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
public Action tTimerCallback(Handle timer, any userid)
{
int client = GetClientOfUserId(userid);
// Start adding your code here...
}
|
Aside from the SQL plugin i will def make a update to the keyvalue one and just drop both of the .sp-files here for anyone in future need. I'll take your post in to consideration when updating the keyvalue-based plugin for sure, first thing i'll do in the morning!
__________________