You can see a full explanation on passing parameters through timers at the link I gave you above.
Also, if you are doing it that way, you do not need to have multiple timer callbacks, you can pass the time towards the callback.
Code:
public Action:OnBanClient(client, time, flags, const String:reason[], const String:kick_message[], const String:command[], any:admin)
{
new String:ip[46];
GetClientIP(client, ip, sizeof(ip));
new Handle:timerPack;
CreateDataTimer(1.0, Timer_OnBanClient, timerPack);
WritePackString(timerPack, ip);
WritePackCell(timerPack, time);
if (StrEqual(command, "SMAC"))
{
PrintToChatAll("[SMAC] %N Banned. (%s) ", client, reason);
}
}
public Action:Timer_OnBanClient(Handle:timer, Handle:timerPack)
{
new String:ip[46];
new time;
ResetPack(timerPack);
ReadPackString(timerPack, ip, sizeof(ip));
time = ReadPackCell(timerPack);
if (time == 0)
{
ServerCommand("sm_banip %s 8000", ip);
}
else
{
ServerCommand("sm_banip %s 5", ip);
}
}
NOTE: The time in OnBanClient will not be accurate together with SourceBans, as SourceBans only bans the client for 5 minutes, and then re-checks its database if a client returns after that (while his/her ban is still valid).
__________________