- CMD:bannick(playerid, params[])
- {
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(!IsAdmin(playerid, 3))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś administratorem.");
- return 1;
- }
- new reason[80], NickBB[80], Dni;
- if(sscanf(params, "s[80]is[80]",NickBB, Dni, reason))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /ban [nick gracza] [ilość dni] [powód]");
- return 1;
- }
- BanPlayerNick(NickBB, playerid, Dni, reason);
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(!IsAdmin(playerid, 3))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś administratorem.");
- return 1;
- }
- new player, reason[80], Dni;
- if(sscanf(params, "ids[255]", player, Dni, reason))
- return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /ban [id gracza] [ilość dni] [powód]");
- if(player == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
- return 1;
- }
- BanPlayer(player, playerid, Dni, reason);
- return 1;
- }
- CMD:banserial(playerid, params[])//Dodaj to gdzie chcesz
- {
- if(!IsAdmin(playerid, 5)) return SendClientMessage(playerid, -1, "›› |błąd| Nie jesteś administratorem.");
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- new player,check[60];
- gpci(player, check, sizeof(check));
- if(sscanf(params, "i", player))
- return SendClientMessage(playerid, -1, "›› |błąd| Wpisz: /ban [id gracza]");
- if(player == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
- return 1;
- }
- new mstr[256];
- format(mstr, 256, "INSERT INTO `PFS_Serial_Bans` (`Serial`) VALUES ('%s')", check[player]);
- mysql_query(mstr);
- Kick(player);
- return true;
- }
- CMD:banp(playerid, params[])
- {
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(!IsAdmin(playerid, 4))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś vHead Administratorem.");
- return 1;
- }
- new player, reason[80];
- if(sscanf(params, "is[255]", player, reason))
- return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /banp [id gracza] [powód]");
- if(player == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
- return 1;
- }
- BanPlayer(player, playerid, 9999, reason);
- return 1;
- }
- CMD:jb(playerid, params[])
- {
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(!IsAdmin(playerid, 4))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś Administratorem.");
- return 1;
- }
- new player, reason[80], Dni;
- if(sscanf(params, "ids[255]", player, Dni, reason))
- return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /jb [id gracza] [ilość dni] [powód]");
- if(player == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
- return 1;
- }
- BanPlayer(player, playerid, Dni, reason);
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- return cmd_k(playerid, params);
- }
- CMD:k(playerid, params[])
- {
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(!IsAdmin(playerid, 1))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś administratorem.");
- return 1;
- }
- new PlayerId, Reason[255];
- if(sscanf(params, "us[255]", PlayerId, Reason))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /k [id gracza] [powód]");
- return 1;
- }
- if(PlayerId == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
- return 1;
- }
- KickPlayer(PlayerId, Reason, playerid);
- return 1;
- }
- CMD:setexp(playerid, params[])
- {
- if(!IsAdmin(playerid, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
- return 1;
- }
- new PlayerId, nExp;
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(sscanf(params, "ud", PlayerId, nExp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Użyj: /setexp [id gracza] [Exp]");
- return 1;
- }
- if(PlayerId == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
- return 1;
- }
- if(nExp < -9999999 || nExp > 99999999)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Błędne Exp.");
- return 1;
- }
- Player[PlayerId][Exp] = nExp;
- Player[PlayerId][Level] = GetPlayerLevel(PlayerId);
- SavePlayer(PlayerId);
- UpdatePlayerScore(PlayerId);
- new String[255];
- format(String, sizeof(String), "›› |info| Zmieniłeś(aś) Exp graczowi %s (%d) na %d.", PlayerName2(PlayerId), PlayerId, nExp);
- SendClientMessage(playerid, COLOR_Fioletowy, String);
- format(String, sizeof(String), "›› |info| Administrator %s (%d) zmienił Ci exp na %d.", PlayerName2(playerid), playerid, nExp);
- SendClientMessage(PlayerId, COLOR_Fioletowy, String);
- return 1;
- }
- CMD:jail(playerid, params[])
- {
- return cmd_j(playerid, params);
- }
- CMD:j(playerid, params[])
- {
- if(!IsAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
- return 1;
- }
- new PlayerId, JailTime, Reason[255];
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(sscanf(params, "ids[255]", PlayerId, JailTime, Reason))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /j [id gracza] [czas] [powód]");
- return 1;
- }
- if(PlayerId == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
- return 1;
- }
- if(JailTime < 1 || JailTime > 99999)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Niepoprawny czas.");
- return 1;
- }
- LosKrata(PlayerId);
- Player[PlayerId][InJail] = JailTime;
- new String[255];
- format(String, sizeof(String), "›› |jail| Zostałeś(aś) uwięziony(na) na %d sekund przez administratora: %s (%d). powód: %s", JailTime, PlayerName2(playerid), playerid, Reason);
- SendClientMessage(PlayerId, COLOR_RED, String);
- format(String, sizeof(String), "›› |jail| Gracz: %s (id %d) został uwięziony przez %s (id %d) na %d sekund. powód: %s ", PlayerName2(PlayerId), PlayerId, PlayerName2(playerid), playerid, JailTime, Reason);
- SendClientMessage(playerid, COLOR_ORANGE, String);
- return 1;
- }
- forward LosKrata(PlayerId);
- public LosKrata(PlayerId)
- {
- new losek = random(3);
- KickPlayeInfo[PlayerId] = 0;
- SavePlayerData(PlayerId);
- SetPlayerInterior(PlayerId, 3);
- PlayerResetWeapons(PlayerId);
- zabwyFalse(PlayerId);
- SetPlayerVirtualWorld(PlayerId,6);
- SetPlayerTeam(PlayerId,3);
- GameTextForPlayer(PlayerId,"~b~]~g~JAIL~b~]", 5000, 5);
- if(losek == 0)
- {
- SetPlayerPos(PlayerId, 198.262039,162.568344,1003.029968);
- }
- else if(losek == 1)
- {
- SetPlayerPos(PlayerId, 197.916961,174.479171,1003.023437);
- }
- else if(losek == 2)
- {
- SetPlayerPos(PlayerId, 193.447082,174.353942,1003.023437);
- }
- return 1;
- }
- CMD:freeze(playerid, params[])
- {
- if(!IsAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
- return 1;
- }
- new PlayerId;
- if(IsAdmin(playerid, 1))
- {
- if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 2))
- {
- if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 3))
- {
- if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(IsAdmin(playerid, 4))
- {
- if(IsAdmin(PlayerId, 5))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
- return 1;
- }
- }
- if(sscanf(params, "u", PlayerId))
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /freeze [id gracza]");
- return 1;
- }
- if(PlayerId == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
- return 1;
- }
- TogglePlayerControllable(PlayerId, 0);
- new String[255];
- format(String, sizeof(String), "›› |info| Zostałeś(aś) zamrożony(na) przez : %s (%d).", PlayerName2(playerid), playerid);
- SendClientMessage(PlayerId, COLOR_Fioletowy, String);
- format(String, sizeof(String), "›› |info| Gracz: %s (%d) został zamrożony.", PlayerName2(PlayerId), PlayerId);
- SendClientMessage(playerid, COLOR_Fioletowy, String);
- return 1;
- }