22.03.2014, 15:03
Hello, how to make a offline ban command with y_ini? Please give me an example. thats my ban command:
Код:
CMD:ban(playerid,params[]) { if(IsPlayerConnected(playerid)) { new targetid,reason[105],string[256]; if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" Usage: /ban [playerid] [reason]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat""COL_RED" Player is not connected/online."); format(string, sizeof(string), ""chat""COL_RED" %s %s (%d) has banned %s (%d) | Reason: %s",GetAdminName(playerid),PlayerName(playerid),playerid,PlayerName(targetid),targetid,reason); SendClientMessageToAll(-1,string); BanPlayer(targetid,reason,PlayerName(playerid)); return 1; }