23.05.2013, 06:41
pawn Код:
CMD:banplayer(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new PTiD, name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(PTiD, name, sizeof(name));
if(sscanf(params, "u", PTiD)) return SendClientMessage(playerid, -1, "Uso: /banplayer [ID]");
if(!IsPlayerConnected(PTiD)) return SendClientMessage(playerid, -1, "[ERRO]: Jogador Nгo conectado!");
static ipplayer[16];
GetPlayerIp(PTiD, ipplayer, sizeof(ipplayer));
new string[1000];
format(string, 256, "%s\r\n" ,ipplayer);
ArmazenarFaixaIP(string);
format(string, sizeof(string), "%s Baniu o player %s do servidor!.", name, PTiD);
SendClientMessageToAll(0xC4C4C4FF, string);
Ban(PTiD);
}
else
{
SendClientMessage(playerid, 0xAA3333AA, " VOCК NГO Й ADMIN! ");
}
return 1;
}
Se forem postar o cуdigo pronto pelo menos me explica como fez pra eu aprender