Szerző Téma: Warn-nál ne lehessen mínuszba menni  (Megtekintve 750 alkalommal)

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Dátum: 2012. Május 12. - 15:33:15 »
0 Show voters
Helló!
Van egy parancsom, de ha többször beírom, hogy /unwarn ID Indok, akkor mínuszba megy, tehát: -1/3, vagy -5/3.
Hogyan tudnám megcsinálni, hogy ne lehessen mínuszba vinni a warn-t?

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #1 Dátum: 2012. Május 12. - 15:34:38 »
0 Show voters
Bemásolnád a parancsot?

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #2 Dátum: 2012. Május 12. - 15:43:16 »
0 Show voters
Természetesen!  ;D
 
CMD:warn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) < 1 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player, indok[128];
if(sscanf(params, \"us[128]\", player, indok)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /warn [Név/ID] [indok]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   if(GetPlayerAdminLevel(playerid) < GetPlayerAdminLevel(player)) //return SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz kickelni?!\");
   {
            new string[128];
      SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz warnolni?\");
            format(string, sizeof(string), \"%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy...\", PlayerName(playerid));
      SendClientMessageToAll(COLOR_INFO, string);
             format(string, sizeof(string), \"%s warnolni akart!\", PlayerName(playerid));
      SendClientMessage(player, COLOR_ERROR, string);
      printf(\"<<%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy... >>\", PlayerName(playerid));
      Kick(playerid);
   }
   new string[128];
   PlayerData[player][Warnings]++;
           if(PlayerData[player][Warnings] <= 2)
          {
      format(string, sizeof(string), \"%s warnolt (%d/3) | Indok: %s\", PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_INFO, string);
      format(string, sizeof(string), \"Warnoltad %s-t (%d/3) | Indok: %s\", PlayerName(player), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_WHITE, string);
      format(string, sizeof(string), \"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessageToAdmins(COLOR_RED, string);
      printf(\"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
          }
   else
   {
      format(string, sizeof(string), \"%s ki lett kickelve a rendszer által | Indok: Összegyûlt 3 warn\", PlayerName(player));
      SendClientMessageToAll(COLOR_INFO, string);
      SendClientMessage(player, COLOR_RED, \"Összegyûlt a 3 warn-od, ezért kickelt a rendszer!\");
      Kick(player);
   }
}
}
return true;
}
CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
}
}
return true;
}

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #3 Dátum: 2012. Május 12. - 15:52:18 »
0 Show voters
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #4 Dátum: 2012. Május 12. - 16:00:01 »
0 Show voters
Idézetet írta: ZyZu date=1336830738\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

 

Annak sok értelme nem lenne, mert akkor nem ad, hanem elvesz warningot!
Így lehetne megcsinálni?
 
         if(PlayerData[player][Warnings] == 0)
   {
       return SendClientMessage(playerid, COLOR_INFO, \"0-nál kevesebb nem lehet a warning-ja!\");
   }

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #5 Dátum: 2012. Május 12. - 19:11:37 »
+1 Show voters
Idézetet írta: ZyZu date=1336830738\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

 

Ne írj hülyeséget. Nem az a baj, hogy hozzáadja, hanem az, hogy mínuszba megy.
 

CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   if(PlayerData[playerid][Warnings] != 0)
   {
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(playerid, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   }
   else
   {
        SendClientMessage(player, COLOR_WHITE, \"Le akartak venni egy warnod, de nincs.\");
        SendClientMessage(player, COLOR_WHITE, \"Az illetõnek nicns warnja.\");
   }
}
}
return true;
}

Warn-nál ne lehessen mínuszba menni
« Válasz #6 Dátum: 2012. Május 12. - 19:43:11 »
+1 Show voters
Idézetet írta: Benceee date=1336842697\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic

CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   if(PlayerData[playerid][Warnings] != 0)
   {
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(playerid, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   }
   else
   {
        SendClientMessage(player, COLOR_WHITE, \"Le akartak venni egy warnod, de nincs.\");
        SendClientMessage(player, COLOR_WHITE, \"Az illetõnek nicns warnja.\");
   }
}
}
return true;
}

 

Ebben az a hiba, hogy ígyis-ugyis leveszi a warnt, megy minuszba, csak másik üzenetet ír ki.
A másik, pedig hogy az Admintól venné le
 
PlayerData[playerid][Warnings] != 0

 


CMD:unwarn(playerid, params[])
{
    new string[128], player;
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
if(PlayerData[player][Warnings] == 0) return SendClientMessage(playerid, COLOR_ERROR, \"Ennek a játékosan nincs figyelmeztetése.\");
PlayerData[player][Warnings]--;
format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
SendClientMessage(player, COLOR_INFO, string);
format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
SendClientMessageToAdmins(COLOR_RED, string);
printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
return true;
}

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #7 Dátum: 2012. Május 12. - 15:33:15 »
0 Show voters
Helló!
Van egy parancsom, de ha többször beírom, hogy /unwarn ID Indok, akkor mínuszba megy, tehát: -1/3, vagy -5/3.
Hogyan tudnám megcsinálni, hogy ne lehessen mínuszba vinni a warn-t?

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #8 Dátum: 2012. Május 12. - 15:34:38 »
0 Show voters
Bemásolnád a parancsot?

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #9 Dátum: 2012. Május 12. - 15:43:16 »
0 Show voters
Természetesen!  ;D
 
CMD:warn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) < 1 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player, indok[128];
if(sscanf(params, \"us[128]\", player, indok)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /warn [Név/ID] [indok]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   if(GetPlayerAdminLevel(playerid) < GetPlayerAdminLevel(player)) //return SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz kickelni?!\");
   {
            new string[128];
      SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz warnolni?\");
            format(string, sizeof(string), \"%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy...\", PlayerName(playerid));
      SendClientMessageToAll(COLOR_INFO, string);
             format(string, sizeof(string), \"%s warnolni akart!\", PlayerName(playerid));
      SendClientMessage(player, COLOR_ERROR, string);
      printf(\"<<%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy... >>\", PlayerName(playerid));
      Kick(playerid);
   }
   new string[128];
   PlayerData[player][Warnings]++;
           if(PlayerData[player][Warnings] <= 2)
          {
      format(string, sizeof(string), \"%s warnolt (%d/3) | Indok: %s\", PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_INFO, string);
      format(string, sizeof(string), \"Warnoltad %s-t (%d/3) | Indok: %s\", PlayerName(player), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_WHITE, string);
      format(string, sizeof(string), \"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessageToAdmins(COLOR_RED, string);
      printf(\"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
          }
   else
   {
      format(string, sizeof(string), \"%s ki lett kickelve a rendszer által | Indok: Összegyûlt 3 warn\", PlayerName(player));
      SendClientMessageToAll(COLOR_INFO, string);
      SendClientMessage(player, COLOR_RED, \"Összegyûlt a 3 warn-od, ezért kickelt a rendszer!\");
      Kick(player);
   }
}
}
return true;
}
CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
}
}
return true;
}

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #10 Dátum: 2012. Május 12. - 15:52:18 »
0 Show voters
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

Nem elérhető Erik3333

  • 945
  • SMF | phpBB | TS3 | PHP | HTML | CSS | JS | PAWN | JAVA
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #11 Dátum: 2012. Május 12. - 16:00:01 »
0 Show voters
Idézetet írta: ZyZu date=1336830738\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

 

Annak sok értelme nem lenne, mert akkor nem ad, hanem elvesz warningot!
Így lehetne megcsinálni?
 
         if(PlayerData[player][Warnings] == 0)
   {
       return SendClientMessage(playerid, COLOR_INFO, \"0-nál kevesebb nem lehet a warning-ja!\");
   }

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Warn-nál ne lehessen mínuszba menni
« Válasz #12 Dátum: 2012. Május 12. - 19:11:37 »
0 Show voters
Idézetet írta: ZyZu date=1336830738\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

 

Ne írj hülyeséget. Nem az a baj, hogy hozzáadja, hanem az, hogy mínuszba megy.
 

CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   if(PlayerData[playerid][Warnings] != 0)
   {
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(playerid, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   }
   else
   {
        SendClientMessage(player, COLOR_WHITE, \"Le akartak venni egy warnod, de nincs.\");
        SendClientMessage(player, COLOR_WHITE, \"Az illetõnek nicns warnja.\");
   }
}
}
return true;
}

Warn-nál ne lehessen mínuszba menni
« Válasz #13 Dátum: 2012. Május 12. - 19:43:11 »
0 Show voters
Idézetet írta: Benceee date=1336842697\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic

CMD:unwarn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
   PlayerData[player][Warnings]--;
   if(PlayerData[playerid][Warnings] != 0)
   {
   format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessage(player, COLOR_INFO, string);
   format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
   SendClientMessage(playerid, COLOR_WHITE, string);
   format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   SendClientMessageToAdmins(COLOR_RED, string);
   printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
   }
   else
   {
        SendClientMessage(player, COLOR_WHITE, \"Le akartak venni egy warnod, de nincs.\");
        SendClientMessage(player, COLOR_WHITE, \"Az illetõnek nicns warnja.\");
   }
}
}
return true;
}

 

Ebben az a hiba, hogy ígyis-ugyis leveszi a warnt, megy minuszba, csak másik üzenetet ír ki.
A másik, pedig hogy az Admintól venné le
 
PlayerData[playerid][Warnings] != 0

 


CMD:unwarn(playerid, params[])
{
    new string[128], player;
if(GetPlayerAdminLevel(playerid) <= 0 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /unwarn [Név/ID]\");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
if(PlayerData[player][Warnings] == 0) return SendClientMessage(playerid, COLOR_ERROR, \"Ennek a játékosan nincs figyelmeztetése.\");
PlayerData[player][Warnings]--;
format(string, sizeof(string), \"%s unwarnolt (%d/3)\", PlayerName(playerid), PlayerData[player][Warnings]);
SendClientMessage(player, COLOR_INFO, string);
format(string, sizeof(string), \"Unwarnoltad %s-t (%d/3)\", PlayerName(player), PlayerData[player][Warnings]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), \"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
SendClientMessageToAdmins(COLOR_RED, string);
printf(\"<< %s unwarnolva lett %s által (%d/3) >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings]);
return true;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal