22.07.2017, 16:34
Code:
stock BanPlayer(playerid, Admin, const reason[]) { new string[150], Month, Day, Year, name[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], File:banlog; getdate(Year, Month, Day); GetPlayerName(playerid, name, MAX_PLAYER_NAME); GetPlayerName(Admin, adminname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s banned by %s[Reason: %s\r][Date: %d/%d/%d]\n", name, adminname, reason, Day, Month, Year); banlog = fopen("BanLog.txt", io_append); fwrite(banlog, string); fclose(banlog); PlayerInfo[playerid][pBanned] = 1; return Kick(playerid); }
Code:
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK) { new Admin[24] = "Anti-cheat"; new bannednamejetpack[MAX_PLAYER_NAME], jetpackbanstring[300 + MAX_PLAYER_NAME]; GetPlayerName(i, bannednamejetpack, sizeof(bannednamejetpack)); format(jetpackbanstring, sizeof(jetpackbanstring), "Anti-cheat: %s has been banned from the server {FFFFFF}[Reason: Jetpack hack]", bannednamejetpack); SendClientMessageToAll(COR_VERMELHO, jetpackbanstring); BanPlayer(i,Admin,reason3); }