26.01.2014, 10:02
Witam.
Jak zrobić komendę przeciwną do tej ? :
Czyli że jak tutaj banuje, to komenda /unban żeby unbanowała ?
Pozdrawiam.
Jak zrobić komendę przeciwną do tej ? :
Код:
CMD:ban(playerid, cmdtext[])
{
if(!ToAdminLevel(playerid,1)) return 1;
new tmp[64],idx;
tmp = strtok(cmdtext, idx);
if(isnull(tmp))
{
Info(playerid,"Użyj: /ban (ID) (powуd)");
return 1;
}
new playa = strval(tmp);
if(playa==playerid){ Info(playerid,"Nie możesz zbanować sam siebie!"); return 1; }
if(IsPlayerConnected(playa))
{
if(PlayerInfo[playa][pAdmin]>PlayerInfo[playerid][pAdmin])
{
Info(playerid,""C_CZERWONY"Nie możesz zbanować admina z większą rangą od twojej!");
return 1;
}
new text[80];
text=strrest(cmdtext,idx);
if(isnull(text))
{
Info(playerid,"Użyj: /ban (ID) (powуd)");
return 1;
}
format(dstring, sizeof(dstring),"Zostałeś zbanowany przez %s(%d) za: %s",Nick(playerid),playerid,text);
Info(playa,dstring);
format(dstring, sizeof(dstring),"~r~(%d)%s zostal zbanowany~n~~y~przez: (%d)%s~n~~w~Za: %s",playa,Nick(playa),playerid,Nick(playerid),text);
NapisText(dstring);
format(dstring, sizeof(dstring),"%s zostal zbanowany przez: %s Za: %s",Nick(playa),Nick(playerid),text);
print(dstring);
PlayerInfo[playa][pKonto]=2;
dBanEx(playa,text);
}
else
{
Info(playerid,"Nie poprawne id gracza!");
}
return 1;
}
Pozdrawiam.

