03.06.2016, 12:21
hey guys iam using jamin3 and when i found a hacker and banned he can join with onther name and play why
Codesss:
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;
}