[Pomoc] unwarn

Započeo Nikola_Soprano, Jun 12, 2013, 20:40:11 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim: Moja editovana
Detaljan opis problema: Treba mi komanda /unwarn, posto sam sluceno dao par warnova....
Dio skripte: Moja komanda Warn:
CMD:warn(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1) {
    new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
    if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, COLOR_RED, "Koriscenje: /warn [Igracev id] [razlog]");
    new warned = strval(tmp), str[128];
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID) {
    if(warned != playerid) {
    ABroadCast(warned,"WARN",1);
PlayerInfo[warned][pWarns]++;
if( PlayerInfo[warned][pWarns] == MAX_WARNINGS) {
GetPlayerName(warned, sendername, sizeof(sendername));
format(str, sizeof (str), "Igrac %s je banovan zbog opomena %s | (Razlog: %s) (Warn: %d/5) |.",sendername, params[1+strlen(tmp)], PlayerInfo[warned][pWarns]);
SendClientMessageToAll(COLOR_LIGHTRED, str);
BanLog(str);
Ban(warned);
return PlayerInfo[warned][pWarns] = 0;
} else {
GetPlayerName(warned, sendername, sizeof(sendername));
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(str, sizeof (str), "Admin %s je dao %s warn | (Razlog: %s) (Warning: %d/5) |.",giveplayer,sendername, params[1+strlen(tmp)], PlayerInfo[warned][pWarns]);
return SendClientMessageToAll(COLOR_LIGHTRED, str);
}
} else return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}[{F81414}BSL-RP{FFFFFF}] Ne mozete dati warn sebi !");
} else return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}[{F81414}BSL-RP{FFFFFF}] Igrac je offline.");
} else return SendClientMessage(playerid,COLOR_RED,"ERROR: You are not a high enough level to use this command");
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /

jednostavno napravi komandu za resetiranje varijabla warna

ili..

ako ovako dajes

PlayerInfo[warned][pWarns]++;

onda ovako oduzmi

PlayerInfo[warned][pWarns]--;
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!