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;}
PlayerData[player][Warnings]--;
Ezt a sort átírod ++ -ra! PlayerData[player][Warnings]--;
if(PlayerData[player][Warnings] == 0) { return SendClientMessage(playerid, COLOR_INFO, \"0-nál kevesebb nem lehet a warning-ja!\"); }
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;}
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;}