[POMOC]/unban /unbanip

Započeo Liquit, Februar 10, 2011, 14:33:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Znaci kada kucam komandu /unban ili /unbanip izlazi mi tekst na ekranu 2puta?
SERVER : Ime_Prezime je unbanao IP : Broj..
SERVER : Ime_Prezime je unbanao IP : Broj..


a kad kucam unban izlazi
SERVER : Igrac Ime_Prezime je unbanan od Admina Ime_Prezime
SERVER : Igrac Ime_Prezime je unbanan od Admina Ime_Prezime

Zasto mi 1ista komanda kucana jednom izlazi 2puta?! ako neko zna kako da napravim ovo neka pise hvala

 if(strcmp(cmd,"/unbanip",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
   tmp = strtok(cmdtext,idx);
   if(!strlen(tmp))
   {
       SendClientMessage(playerid,COLOR_GRAD1,"Koriscenje: /unbanip [igraceva ip]");
       return 1;
  }
format(string,sizeof(string),"unbanip %s",tmp);
SendRconCommand(string);
SendRconCommand("reloadbans");
  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 256, "Administrator %s je unbanao IP %s", sendername,tmp);
ABroadCast(COLOR_RED,string,1);
}
return 1;
}
if (strcmp(cmd, "/unban", true)==0)
{
   if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=1337)
   {
       tmp = strtok(cmdtext, idx);
       if(!strlen(tmp))
{
       SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /unban [Ime_Prezime]");
           return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "Administrator %s je unbanao %s-a", sendername, tmp);
ABroadCast(COLOR_RED,string,1);
format(string, 256, "Administrator %s je unbanao %s-a", sendername, tmp);
printf(string);
format(string,sizeof(string),"%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Igrac je unbanovan");
SendRconCommand(string);
SendRconCommand("reloadbans");
  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}
Poslednja Izmena: Februar 10, 2011, 14:43:53 POSLE PODNE od ZnaciNemanja

Budite na svome, budite na Afrika Gaming
www.afrika-gaming.com

1. Ovo ti je komanda prvo pošalje svim adminima, onda ovisi za šta ti je ono drugo...

if (strcmp(cmd, "/unban", true)==0)
{
    if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=1337)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
{
        SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /unban [Ime_Prezime]");
            return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "Administrator %s je unbanao %s-a", sendername, tmp);
ABroadCast(COLOR_RED,string,1);
format(string, 256, "Administrator %s je unbanao %s-a", sendername, tmp);
printf(string);
format(string,sizeof(string),"%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Igrac je unbanovan");
SendRconCommand(string);
SendRconCommand("reloadbans");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}


Pogledaj malo bolje,jedna salje adminima a jedna salje tebi .

if (strcmp(cmd, "/unban", true)==0)
{
    if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=1337)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
{
        SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /unban [Ime_Prezime]");
            return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(giveplayer));
format(string, 256, "Administrator %s je unbanao %s-a", sendername, tmp);
ABroadCast(COLOR_RED,string,1);
printf(string);
format(string,sizeof(string),"%s.ini",tmp);
fremove(string);
SendClientMessage(playerid, COLOR_WHITE, "Igrac je unbanovan");
SendRconCommand(string);
SendRconCommand("reloadbans");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
}
return 1;
}

tako stavi .

Jel ti treba da izbacimo kad unbanuje da vidis samo taj koji unbanuje a ostali admini ne?