26.11.2011, 13:01
How would I add something to Scriptfiles/Logs/ban.log ? I know it'd be something like /Logs/ban.log but how would I add it to
so that when you get /ban'ned it adds it to ban.log?
Код:
CMD:ban(playerid, params[]) { new string[128], giveplayerid, adminname[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME], reason[50]; if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COL_GREY, "You are not authorized for that command!"); else if(sscanf(params, "rs[50]", giveplayerid, reason)) return SendClientMessage(playerid, COL_GREY, "Usage: /ban [ID/PartOfName] [Reason]"); else if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COL_GREY, "Invalid playerid!"); else { format(string, sizeof(string), "SERVER: %s have been banned by %s, reason: %s.", playername, adminname, reason); SendClientMessageToAll(0xF81414FF, string); Kick(giveplayerid); } return 1; }