01.07.2012, 23:09
Код:
#include <a_samp> #include <sscanf2> #include <zcmd> #define MAXIMAL_PLAYERS 100 #define RED "{FF0000}" #define DARK_RED "{BB0000}" new PlayerName[MAXIMAL_PLAYERS][50]; new PlayerAdministrator[MAXIMAL_PLAYERS]; public OnPlayerConnect(playerid) { GetPlayerName(playerid,PlayerName[playerid],50); PlayerAdministrator[playerid] = 0; return 1; } COMMAND:aban(playerid,params[]) { if(PlayerAdministrator[playerid] == 1) { new PlayerID,Reason[150]; if(!sscanf(params,"is[150]",PlayerID,Reason)) { if(IsPlayerConnected(PlayerID)) { new String[150]; format(String,150,""RED">> Gracz "DARK_RED"%s (%i) "RED"został zbanowany na serwerze przez administratora "DARK_RED"%s (%i)"RED". Powуd: "DARK_RED"%s",PlayerName[PlayerID],PlayerID,PlayerName[playerid],playerid,Reason); SendClientMessageToAll(0,String); Ban(PlayerID); } else return SendClientMessage(playerid,0,""RED">> Gracz o podanym id nie jest na serwerze."); } else return SendClientMessage(playerid,0,""RED">> Wpisz /Ban [ID] [Powуd]."); } else return SendClientMessage(playerid,0,""RED">> Nie masz uprawnień do używania tej komendy."); return 1; }