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(playeridparams[])
{
    
LoginCheck(playerid);
    
LevelCheck(playerid3);
    new
        
string[128],
        
id,
        
reason[128],
        
when[128],
        
ban_hrban_minban_secban_monthban_daysban_years
    
;
    
gettime(ban_hrban_minban_sec);
    
getdate(ban_yearsban_monthban_days);
    if(
sscanf(params"uS(No Reason)[128]"idreason)) return SendClientMessage(playeridCOLOR_RED"<!> Syntax Error: /ban [playerid] [reason(Default: No Reason)]");
    if(
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"Syntax Error: Player not connected.");
    if(
id == playerid) return SendClientMessage(playeridCOLOR_RED"Syntax Error: You cannot use this command to yourself.");
    if(
User[playerid][accountAdmin] < User[id][accountAdmin]) return SendClientMessage(playeridCOLOR_RED"Syntax Error: You cannot use this command on higher admin.");
    
format(when128"%02d/%02d/%d %02d:%02d:%02d"ban_monthban_daysban_yearsban_hrban_minban_sec);
    
format(stringsizeof(string), "** %s(ID:%d) has been banned by Administrator %s(%d) (Reason: %s)"pName(id), idpName(playerid), playeridreason);
    
SendClientMessageToAll(COLOR_GREYstring);
    
printf(string);
    
#if LOG == true
        
SaveLog("banlog.txt"string);
    
#endif
    
format(stringsizeof(string), "You have banned %s(%d) for %s."pName(id), idreason);
    
SendClientMessage(playeridCOLOR_YELLOWstring);
    
format(stringsizeof(string), "You have been banned by Administrator %s(%d) (Reason: %s)"pName(playerid), playeridreason);
    
SendClientMessage(idCOLOR_YELLOWstring);
    
BanAccount(idpName(playerid), reason);
    
ShowBan(idpName(playerid), reasonwhen);
    
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: 2 Guest(s)