Ban CMD
#1

hey guys iam using jamin3 and when i found a hacker and banned he can join with onther name and play why

Codesss:

PHP код:
CMD:ban(playerid, params[])
{
    
LoginCheck(playerid);
    
LevelCheck(playerid, 3);
    new
        
string[128],
        
id,
        
reason[128],
        
when[128],
        
ban_hr, ban_min, ban_sec, ban_month, ban_days, ban_years
    
;
    
gettime(ban_hr, ban_min, ban_sec);
    
getdate(ban_years, ban_month, ban_days);
    if(
sscanf(params, "uS(No Reason)[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "<!> Syntax Error: /ban [playerid] [reason(Default: No Reason)]");
    if(
id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: Player not connected.");
    if(
id == playerid) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: You cannot use this command to yourself.");
    if(
User[playerid][accountAdmin] < User[id][accountAdmin]) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: You cannot use this command on higher admin.");
    
format(when, 128, "%02d/%02d/%d %02d:%02d:%02d", ban_month, ban_days, ban_years, ban_hr, ban_min, ban_sec);
    
format(string, sizeof(string), "** %s(ID:%d) has been banned by Administrator %s(%d) (Reason: %s)", pName(id), id, pName(playerid), playerid, reason);
    
SendClientMessageToAll(COLOR_GREY, string);
    
printf(string);
    
#if LOG == true
        
SaveLog("banlog.txt", string);
    
#endif
    
format(string, sizeof(string), "You have banned %s(%d) for %s.", pName(id), id, reason);
    
SendClientMessage(playerid, COLOR_YELLOW, string);
    
format(string, sizeof(string), "You have been banned by Administrator %s(%d) (Reason: %s)", pName(playerid), playerid, reason);
    
SendClientMessage(id, COLOR_YELLOW, string);
    
BanAccount(id, pName(playerid), reason);
    
ShowBan(id, pName(playerid), reason, when);
    
KickDelay(id);
    return 
1;
} 
Reply
#2

if he changed his ip, he is able to connect again
Reply
#3

in the game if he dont chage his ip and change name he can join
Reply
#4

Add this to your ban CMD

new string [128], ip[128];
GetPlayerIp(pName,ip,sizeof(ip));
format(string, sizeof(string),"banip %s", ip);
SendRconCommand(string);
SendRconCommand("reloadbans");
Reply
#5

Hackers can change their IP address and connect as much a they want.

for a final solution:

Download or script an Anti-Hack system. the server will ban hackers when the script detects certain things. Like hackers spawning guns, spawning money, teleporting across the map, health hacks etc...

Also build a strong admin team across the different timezones!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)