[Ajuda]BAN
#1

Eu tentei fazer um ban com o ban rcon

Код:
if(strcmp(cmd, "/ban", true) == 0)
{
    new tmp2[256];
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /ban [ID] [razгo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3)
{
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Razгo: %s (%d-%d-%d)", giveplayer, sendername, tmp2,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s foi banido por %s, Razгo: %s", giveplayer, sendername, tmp2);
SendClientMessageToAll(COLOR_LIGHTRED, string);
SendRconCommand("ban");
PlayerInfo[giveplayerid][pLocked] = 1;
return 1;
}
mas nao funcionou
o player nao era banido so aparecia a frase
e acredito que isso aconteceu pq o ban via rcon tem que ter o nick do player junto
como eu posso adapta isso SendRconCommand("ban");
para pegar o nick do player que quero banir??
Reply


Messages In This Thread
[Ajuda]BAN - by keller012 - 11.07.2010, 22:17
Re: [Ajuda]BAN - by [BEP]AcerPilot - 11.07.2010, 23:38
Re: [Ajuda]BAN - by TiagoPS - 12.07.2010, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)