Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Ban CMD

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

Codesss:

PHP Code:

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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>