14.02.2016, 16:34
Код:
CMD:ban2(playerid, params[]) { new target[MAX_PLAYER_NAME], filestring[79], reason[64], playerID, playerName[MAX_PLAYER_NAME], string[144], string2[144]; if(sscanf(params, "us[32]", playerID, reason)) return SCM(playerid, COLOR_GREY, "CMD: /ban [id] [reason]"); format(filestring, sizeof(filestring), "/Users/%s.ini", target); new INI:File = INI_Open(filestring); INI_SetTag(File, "data"); INI_WriteInt(File, "Banned", 1); INI_Close(File); new done[128]; format(done, sizeof(done), "You banned %s", target); SendClientMessage(playerid,-1 , done); SetTimerEx("ZBan", 1000, false, "i", playerID); format(string, sizeof(string), "'%s was banned by %s.", target, playerName); SCMTL(COLOR_RED, string); SCM(playerID, -1, "Notification!"); format(string2,sizeof(string2),"SRW: you was banned by %s | reason: %s",playerName,reason); SCM(playerID,-1,string2); format(string, sizeof(string), "'%s was banned by %s | reason: %s ", target, playerName, reason); SendMessageToAdmins(0xFF6347FF, string, 1); return 1; }