Facebook
From Semi, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 280
  1. CMD:ban(playerid, params[])
  2. {
  3.         if(IsAdmin(playerid, 1))
  4.    {
  5.        if(IsAdmin(player, 2) || IsAdmin(player, 3) || IsAdmin(player, 4) || IsAdmin(player, 5))
  6.            {
  7.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  8.                         return 1;
  9.            }
  10.    }
  11.    if(IsAdmin(playerid, 2))
  12.    {
  13.        if(IsAdmin(player, 3) || IsAdmin(player, 4) || IsAdmin(player, 5))
  14.            {
  15.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  16.                         return 1;
  17.            }
  18.    }
  19.    if(IsAdmin(playerid, 3))
  20.    {
  21.        if(IsAdmin(player, 4) || IsAdmin(player, 5))
  22.            {
  23.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  24.                         return 1;
  25.            }
  26.    }
  27.    if(IsAdmin(playerid, 4))
  28.    {
  29.        if(IsAdmin(player, 5))
  30.            {
  31.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  32.                         return 1;
  33.            }
  34.    }
  35.         if(!IsAdmin(playerid, 3))
  36.         {
  37.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś administratorem.");
  38.                 return 1;
  39.         }
  40.  
  41.         new player, reason[80], Dni;
  42.         if(sscanf(params, "ids[255]", player, Dni, reason))
  43.                 return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /ban [id gracza] [ilość dni] [powód]");
  44.  
  45.         if(player == INVALID_PLAYER_ID)
  46.         {
  47.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
  48.                 return 1;
  49.         }
  50.  
  51.         BanPlayer(player, playerid, Dni, reason);
  52.         return 1;
  53. }
  54.  
  55.  
  56.  
  57. CMD:banp(playerid, params[])
  58. {
  59. new player, reason[80];
  60.                 if(IsAdmin(playerid, 1))
  61.    {
  62.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  63.            {
  64.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  65.                         return 1;
  66.            }
  67.    }
  68.    if(IsAdmin(playerid, 2))
  69.    {
  70.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  71.            {
  72.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  73.                         return 1;
  74.            }
  75.    }
  76.    if(IsAdmin(playerid, 3))
  77.    {
  78.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  79.            {
  80.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  81.                         return 1;
  82.            }
  83.    }
  84.    if(IsAdmin(playerid, 4))
  85.    {
  86.        if(IsAdmin(PlayerId, 5))
  87.            {
  88.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  89.                         return 1;
  90.            }
  91.    }
  92.         if(!IsAdmin(playerid, 4))
  93.         {
  94.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś vHead Administratorem.");
  95.                 return 1;
  96.         }
  97.  
  98.        
  99.     if(sscanf(params, "is[255]", player, reason))
  100.                 return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /banp [id gracza] [powód]");
  101.  
  102.         if(player == INVALID_PLAYER_ID)
  103.         {
  104.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
  105.                 return 1;
  106.         }
  107.  
  108.         BanPlayer(player, playerid, 9999, reason);
  109.         return 1;
  110. }
  111.  
  112. CMD:jb(playerid, params[])
  113. {
  114. if(IsAdmin(playerid, 1))
  115.    {
  116.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  117.            {
  118.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  119.                         return 1;
  120.            }
  121.    }
  122.    if(IsAdmin(playerid, 2))
  123.    {
  124.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  125.            {
  126.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  127.                         return 1;
  128.            }
  129.    }
  130.    if(IsAdmin(playerid, 3))
  131.    {
  132.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  133.            {
  134.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  135.                         return 1;
  136.            }
  137.    }
  138.    if(IsAdmin(playerid, 4))
  139.    {
  140.        if(IsAdmin(PlayerId, 5))
  141.            {
  142.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  143.                         return 1;
  144.            }
  145.    }
  146.         if(!IsAdmin(playerid, 4))
  147.         {
  148.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś Administratorem.");
  149.                 return 1;
  150.         }
  151.  
  152.         new player, reason[80], Dni;
  153.         if(sscanf(params, "ids[255]", player, Dni, reason))
  154.                 return SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /jb [id gracza] [ilość dni] [powód]");
  155.  
  156.         if(player == INVALID_PLAYER_ID)
  157.         {
  158.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
  159.                 return 1;
  160.         }
  161.  
  162.         BanPlayer(player, playerid, Dni, reason);
  163.         return 1;
  164. }
  165.  
  166.  
  167.  
  168. CMD:kick(playerid, params[])
  169. {
  170.         return cmd_k(playerid, params);
  171. }
  172. CMD:k(playerid, params[])
  173. {
  174.  new PlayerId, Reason[255];
  175. if(IsAdmin(playerid, 1))
  176.    {
  177.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  178.            {
  179.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  180.                         return 1;
  181.            }
  182.    }
  183.    if(IsAdmin(playerid, 2))
  184.    {
  185.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  186.            {
  187.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  188.                         return 1;
  189.            }
  190.    }
  191.    if(IsAdmin(playerid, 3))
  192.    {
  193.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  194.            {
  195.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  196.                         return 1;
  197.            }
  198.    }
  199.    if(IsAdmin(playerid, 4))
  200.    {
  201.        if(IsAdmin(PlayerId, 5))
  202.            {
  203.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  204.                         return 1;
  205.            }
  206.    }
  207.         if(!IsAdmin(playerid, 1))
  208.         {
  209.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś administratorem.");
  210.                 return 1;
  211.         }
  212.  
  213.        
  214.         if(sscanf(params, "us[255]", PlayerId, Reason))
  215.         {
  216.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /k [id gracza] [powód]");
  217.                 return 1;
  218.         }
  219.  
  220.         if(PlayerId == INVALID_PLAYER_ID)
  221.         {
  222.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma takiego gracza.");
  223.                 return 1;
  224.         }
  225.  
  226.     KickPlayer(PlayerId, Reason, playerid);
  227.  
  228.         return 1;
  229. }
  230.  
  231.  
  232.  
  233.  
  234.  
  235. CMD:setexp(playerid, params[])
  236. {
  237.                
  238.         if(!IsAdmin(playerid, 5))
  239.         {
  240.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
  241.                 return 1;
  242.         }
  243.  
  244.         new PlayerId, nExp;
  245.                 if(IsAdmin(playerid, 1))
  246.    {
  247.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  248.            {
  249.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  250.                         return 1;
  251.            }
  252.    }
  253.    if(IsAdmin(playerid, 2))
  254.    {
  255.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  256.            {
  257.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  258.                         return 1;
  259.            }
  260.    }
  261.    if(IsAdmin(playerid, 3))
  262.    {
  263.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  264.            {
  265.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  266.                         return 1;
  267.            }
  268.    }
  269.    if(IsAdmin(playerid, 4))
  270.    {
  271.        if(IsAdmin(PlayerId, 5))
  272.            {
  273.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  274.                         return 1;
  275.            }
  276.    }
  277.         if(sscanf(params, "ud", PlayerId, nExp))
  278.         {
  279.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Użyj: /setexp [id gracza] [Exp]");
  280.                 return 1;
  281.         }
  282.  
  283.         if(PlayerId == INVALID_PLAYER_ID)
  284.         {
  285.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
  286.                 return 1;
  287.         }
  288.  
  289.         if(nExp < -9999999 || nExp > 99999999)
  290.         {
  291.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Błędne Exp.");
  292.                 return 1;
  293.         }
  294.         Player[PlayerId][Exp] = nExp;
  295.         Player[PlayerId][Level] = GetPlayerLevel(PlayerId);
  296.         SavePlayer(PlayerId);
  297.         UpdatePlayerScore(PlayerId);
  298.  
  299.         new String[255];
  300.         format(String, sizeof(String), "›› |info| Zmieniłeś(aś) Exp graczowi %s (%d) na %d.", PlayerName2(PlayerId), PlayerId, nExp);
  301.         SendClientMessage(playerid, COLOR_Fioletowy, String);
  302.         format(String, sizeof(String), "›› |info| Administrator %s (%d) zmienił Ci exp na %d.", PlayerName2(playerid), playerid, nExp);
  303.         SendClientMessage(PlayerId, COLOR_Fioletowy, String);
  304.  
  305.         return 1;
  306. }
  307.  
  308.  
  309.  
  310.  
  311.  
  312. CMD:jail(playerid, params[])
  313. {
  314.         return cmd_j(playerid, params);
  315. }
  316. CMD:j(playerid, params[])
  317. {
  318.         if(!IsAdmin(playerid))
  319.         {
  320.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
  321.                 return 1;
  322.         }
  323.  
  324.         new PlayerId, JailTime, Reason[255];
  325.                 if(IsAdmin(playerid, 1))
  326.    {
  327.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  328.            {
  329.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  330.                         return 1;
  331.            }
  332.    }
  333.    if(IsAdmin(playerid, 2))
  334.    {
  335.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  336.            {
  337.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  338.                         return 1;
  339.            }
  340.    }
  341.    if(IsAdmin(playerid, 3))
  342.    {
  343.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  344.            {
  345.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  346.                         return 1;
  347.            }
  348.    }
  349.    if(IsAdmin(playerid, 4))
  350.    {
  351.        if(IsAdmin(PlayerId, 5))
  352.            {
  353.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  354.                         return 1;
  355.            }
  356.    }
  357.         if(sscanf(params, "ids[255]", PlayerId, JailTime, Reason))
  358.         {
  359.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /j [id gracza] [czas] [powód]");
  360.                 return 1;
  361.         }
  362.  
  363.         if(PlayerId == INVALID_PLAYER_ID)
  364.         {
  365.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
  366.                 return 1;
  367.         }
  368.  
  369.         if(JailTime < 1 || JailTime > 99999)
  370.         {
  371.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Niepoprawny czas.");
  372.                 return 1;
  373.         }
  374.         LosKrata(PlayerId);
  375.         Player[PlayerId][InJail] = JailTime;
  376.  
  377.         new String[255];
  378.         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);
  379.         SendClientMessage(PlayerId, COLOR_RED, String);
  380.         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);
  381.         SendClientMessage(playerid, COLOR_ORANGE, String);
  382.         return 1;
  383. }
  384.  
  385. forward LosKrata(PlayerId);
  386. public LosKrata(PlayerId)
  387. {
  388.         new losek = random(3);
  389.  
  390.         KickPlayeInfo[PlayerId] = 0;
  391.         SavePlayerData(PlayerId);
  392.         SetPlayerInterior(PlayerId, 3);
  393.         PlayerResetWeapons(PlayerId);
  394.         zabwyFalse(PlayerId);
  395.         SetPlayerVirtualWorld(PlayerId,6);
  396.         SetPlayerTeam(PlayerId,3);
  397.  
  398.         GameTextForPlayer(PlayerId,"~b~]~g~JAIL~b~]", 5000, 5);
  399.  
  400.         if(losek == 0)
  401.         {
  402.         SetPlayerPos(PlayerId, 198.262039,162.568344,1003.029968);
  403.         }
  404.         else if(losek == 1)
  405.         {
  406.         SetPlayerPos(PlayerId, 197.916961,174.479171,1003.023437);
  407.         }
  408.         else if(losek == 2)
  409.         {
  410.         SetPlayerPos(PlayerId, 193.447082,174.353942,1003.023437);
  411.         }
  412.         return 1;
  413. }
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420. CMD:freeze(playerid, params[])
  421. {
  422.         if(!IsAdmin(playerid))
  423.         {
  424.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie jesteś upoważniony(a) do użycia tej komendy.");
  425.                 return 1;
  426.         }
  427.  
  428.         new PlayerId;
  429.                 if(IsAdmin(playerid, 1))
  430.    {
  431.        if(IsAdmin(PlayerId, 2) || IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  432.            {
  433.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  434.                         return 1;
  435.            }
  436.    }
  437.    if(IsAdmin(playerid, 2))
  438.    {
  439.        if(IsAdmin(PlayerId, 3) || IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  440.            {
  441.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  442.                         return 1;
  443.            }
  444.    }
  445.    if(IsAdmin(playerid, 3))
  446.    {
  447.        if(IsAdmin(PlayerId, 4) || IsAdmin(PlayerId, 5))
  448.            {
  449.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  450.                         return 1;
  451.            }
  452.    }
  453.    if(IsAdmin(playerid, 4))
  454.    {
  455.        if(IsAdmin(PlayerId, 5))
  456.            {
  457.                         SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie możesz dać mute adminowi z wyższym lvl od ciebie!.");
  458.                         return 1;
  459.            }
  460.    }
  461.         if(sscanf(params, "u", PlayerId))
  462.         {
  463.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Wpisz: /freeze [id gracza]");
  464.                 return 1;
  465.         }
  466.  
  467.         if(PlayerId == INVALID_PLAYER_ID)
  468.         {
  469.                 SendClientMessage(playerid, COLOR_ERROR, "›› |błąd| Nie ma gracza o podanym id.");
  470.                 return 1;
  471.         }
  472.  
  473.         TogglePlayerControllable(PlayerId, 0);
  474.  
  475.         new String[255];
  476.         format(String, sizeof(String), "›› |info| Zostałeś(aś) zamrożony(na) przez : %s (%d).", PlayerName2(playerid), playerid);
  477.         SendClientMessage(PlayerId, COLOR_Fioletowy, String);
  478.         format(String, sizeof(String), "›› |info| Gracz: %s (%d) został zamrożony.", PlayerName2(PlayerId), PlayerId);
  479.         SendClientMessage(playerid, COLOR_Fioletowy, String);
  480.  
  481.         return 1;
  482. }