Open Martin-H2 opened 7 years ago
g_AdminControl.BanPlayer(p, minutes, reason); g_AdminControl.KickPlayer(p, reason);
As for now, coders need to do very dirty workarounds like:
if(iMinutes > 0) g_EngineFuncs.ServerCommand("kick #"+string(g_EngineFuncs.GetPlayerUserId(pTarget.edict()))+" \""+sReason+" (ban duration: "+string(iMinutes)+")\"\n"); else g_EngineFuncs.ServerCommand("kick #"+string(g_EngineFuncs.GetPlayerUserId(pTarget.edict()))+" \""+sReason+" (ban duration: permanent)\"\n"); g_EngineFuncs.ServerCommand("wait\n"); if(!bBanIp) g_EngineFuncs.ServerCommand("banid "+string(iMinutes)+" "+sId+"\n"); if(bBanIp) g_EngineFuncs.ServerCommand("addip "+string(iMinutes)+" "+sIp+"\n"); g_EngineFuncs.ServerCommand("wait\n"); if(!bBanIp) g_EngineFuncs.ServerCommand("writeid\n"); if(bBanIp) g_EngineFuncs.ServerCommand("writeip\n");
g_AdminControl.BanPlayer(p, minutes, reason); g_AdminControl.KickPlayer(p, reason);
As for now, coders need to do very dirty workarounds like: