Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 101.82 KB | None | 0 0
  1. dcmd_rac(playerid, cmdtext[])
  2. {
  3. #pragma unused cmdtext
  4.  
  5.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  6.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  7.  
  8.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  9.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  10.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  11.  
  12.     if(g_player_info[playerid][E_admin_lvl] == 1)
  13.     {
  14.         SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
  15.          wyrzuca wskazanego gracza z serwera");
  16.         SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
  17.          wyœwietla informacje o wskazanym graczu");
  18.         SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
  19.          wręcza ostrzeżenie wskazanemu graczowi");
  20.         SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
  21.          wyœwietla ostrzeżenia wskazanego gracza");
  22.         SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
  23.          wyœwietla pochwały wskazanego gracza");
  24.         SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
  25.          umieszcza wskazanego gracza w więzieniu");
  26.         SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
  27.          wypuszcza gracza z więzienia");
  28.         SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
  29.          respawnuje nieużywane pojazdy");
  30.     }
  31.     else if(g_player_info[playerid][E_admin_lvl] == 2)
  32.     {
  33.         SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
  34.          wyrzuca wskazanego gracza z serwera");
  35.         SendClientMessage(playerid, COLOR_YELLOW, "/ban(b) [ID gracza] [powód] - \
  36.          banuje oraz wyrzuca wskazanego gracza z serwera");
  37.         SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
  38.          wyœwietla informacje o wskazanym graczu");
  39.         SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
  40.          wręcza ostrzeżenie wskazanemu graczowi");
  41.         SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
  42.          wyœwietla ostrzeżenia wskazanego gracza");
  43.         SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
  44.          wyœwietla pochwały wskazanego gracza");
  45.         SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
  46.          umieszcza wskazanego gracza w więzieniu");
  47.         SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
  48.          wypuszcza gracza z więzienia");
  49.     }
  50.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  51.     {
  52.         SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
  53.          wyrzuca wskazanego gracza z serwera");
  54.         SendClientMessage(playerid, COLOR_YELLOW, "/ban(b) [ID gracza] [powód] - \
  55.          banuje oraz wyrzuca wskazanego gracza z serwera");
  56.         SendClientMessage(playerid, COLOR_YELLOW, "/banacc(ba) [Nazwa konta] - \
  57.          blokuje wskazane konto");
  58.         SendClientMessage(playerid, COLOR_YELLOW, "/unbanacc(unba) [Nazwa konta] - \
  59.          odblokowuje wskazane konto");
  60.         SendClientMessage(playerid, COLOR_YELLOW, "/delacc(dac) [Nazwa konta] - \
  61.          kasuje wskazane konto");
  62.         SendClientMessage(playerid, COLOR_YELLOW, "/banip(bip) [Adres IP] - \
  63.          banuje wskazany adres IP");
  64.         SendClientMessage(playerid, COLOR_YELLOW, "/unbanip(unb) [Adres IP] - \
  65.          odbanowuje wskazany adres IP");
  66.         SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
  67.          wyœwietla informacje o wskazanym graczu");
  68.     }
  69.     SendClientMessage(playerid, COLOR_ORANGE, "/rac2 - następna strona");
  70.     return 1;
  71. }
  72.  
  73. dcmd_rac2(playerid, cmdtext[])
  74. {
  75. #pragma unused cmdtext
  76.  
  77.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  78.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  79.  
  80.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  81.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  82.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  83.  
  84.     if(g_player_info[playerid][E_admin_lvl] == 1)
  85.     {
  86.         SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
  87.          zamraża wskazanego gracza");
  88.         SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
  89.          odmraża wskazanego gracza");
  90.         SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
  91.          wyœwietla listę ID broni");
  92.         SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
  93.          daje Ci wybranš broń wraz ze wskazanš iloœciš amunicji");
  94.         SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
  95.          daje Ci predefiniowany zestaw broni");
  96.         SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
  97.          wyłšczasz/włšczasz swojš skrzynkę PM");
  98.         SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
  99.          blokujesz wskazanemu graczowi możliwoœć wysyłania wiadomoœci");
  100.         SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
  101.          komenda o działaniu odwrotnym do powyższej");
  102.     }
  103.     else if(g_player_info[playerid][E_admin_lvl] == 2)
  104.     {
  105.         SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
  106.          zamraża wskazanego gracza");
  107.         SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
  108.          odmraża wskazanego gracza");
  109.         SendClientMessage(playerid, COLOR_YELLOW, "/setgravity(sg) [grawitacja] - \
  110.          ustawia wybrany poziom gracza");
  111.         SendClientMessage(playerid, COLOR_YELLOW, "/setweather(sw) [pogoda] - \
  112.          ustawia wybranš pogodę");
  113.         SendClientMessage(playerid, COLOR_YELLOW, "/settime(st) [godzina] - \
  114.          ustawia wybranš godzinę");
  115.         SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
  116.          wyœwietla listę ID broni");
  117.         SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
  118.          daje Ci wybranš broń wraz ze wskazanš iloœciš amunicji");
  119.         SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
  120.          daje Ci predefiniowany zestaw broni");
  121.     }
  122.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  123.     {
  124.         SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
  125.          wręcza ostrzeżenie wskazanemu graczowi");
  126.         SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
  127.          wyœwietla ostrzeżenia wskazanego gracza");
  128.         SendClientMessage(playerid, COLOR_YELLOW, "/deletewarn(dw) [ID gracza] [ID warna] - \
  129.          kasuje wybrane ostrzeżenie u wskazanego gracza");
  130.         SendClientMessage(playerid, COLOR_YELLOW, "/praise(p) [ID gracza] [powód] - \
  131.          wręcza pochwałę wskazanemu graczowi");
  132.         SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
  133.          wyœwietla pochwały wskazanego gracza");
  134.         SendClientMessage(playerid, COLOR_YELLOW, "/deletepraise(dp) [ID gracza] [ID pochwały] - \
  135.          kasuje wybranš pochwałę u wskazanego gracza");
  136.         SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
  137.          umieszcza wskazanego gracza w więzieniu");
  138.         SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
  139.          wypuszcza gracza z więzienia");
  140.     }
  141.     SendClientMessage(playerid, COLOR_ORANGE, "/rac - poprzednia strona <> /rac3 - następna strona");
  142.     return 1;
  143. }
  144.  
  145. dcmd_rac3(playerid, cmdtext[])
  146. {
  147. #pragma unused cmdtext
  148.  
  149.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  150.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  151.  
  152.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  153.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  154.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  155.  
  156.     if(g_player_info[playerid][E_admin_lvl] == 1)
  157.     {
  158.         SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
  159.          obserwujesz wskazanego gracza");
  160.         SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
  161.          wyłšcza tryb podglšdu gracza");
  162.         SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
  163.          czyœci czat");
  164.         SendClientMessage(playerid, COLOR_YELLOW, "/lastlogin [Nazwa konta] - \
  165.          podaje datę ostatniego logowania na wskazanym koncie");
  166.         SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
  167.          zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
  168.         SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
  169.            ignoruje wskazanego gracza");
  170.     }
  171.     else if(g_player_info[playerid][E_admin_lvl] == 2)
  172.     {
  173.         SendClientMessage(playerid, COLOR_YELLOW, "/givegun(gg) [ID gracza] [ID broni] [Amunicja] - \
  174.          daje broń wskazanemu graczowi");
  175.         SendClientMessage(playerid, COLOR_YELLOW, "/disarm(d) [ID gracza] - \
  176.          rozbraja wskazanego gracza");
  177.         SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
  178.          wyłšczasz/włšczasz swojš skrzynkę PM");
  179.         SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
  180.          blokujesz wskazanemu graczowi możliwoœć wysyłania wiadomoœci");
  181.         SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
  182.          komenda o działaniu odwrotnym do powyższej");
  183.         SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
  184.          czyœci czat");
  185.         SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
  186.          obserwujesz wskazanego gracza");
  187.         SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
  188.          wyłšcza tryb podglšdu gracza");
  189.     }
  190.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  191.     {
  192.         SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
  193.          zamraża wskazanego gracza");
  194.         SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
  195.          odmraża wskazanego gracza");
  196.         SendClientMessage(playerid, COLOR_YELLOW, "/setgravity(sg) [grawitacja] - \
  197.          ustawia wybrany poziom gracza");
  198.         SendClientMessage(playerid, COLOR_YELLOW, "/setweather(sw) [pogoda] - \
  199.          ustawia wybranš pogodę");
  200.         SendClientMessage(playerid, COLOR_YELLOW, "/settime(st) [godzina] - \
  201.          ustawia wybranš godzinę");
  202.         SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
  203.          wyœwietla listę ID broni");
  204.         SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
  205.          daje Ci wybranš broń wraz ze wskazanš iloœciš amunicji");
  206.         SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
  207.          daje Ci predefiniowany zestaw broni");
  208.  
  209.     }
  210.     SendClientMessage(playerid, COLOR_ORANGE, "/rac2 - poprzednia strona <> /rac4 - następna strona");
  211.     return 1;
  212. }
  213.  
  214. dcmd_rac4(playerid, cmdtext[])
  215. {
  216. #pragma unused cmdtext
  217.  
  218.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  219.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  220.  
  221.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  222.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  223.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  224.  
  225.     if(g_player_info[playerid][E_admin_lvl] == 1)
  226.     {
  227.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  228.     }
  229.     else if(g_player_info[playerid][E_admin_lvl] == 2)
  230.     {
  231.         SendClientMessage(playerid, COLOR_YELLOW, "/announce(ann) [Czas] [Tekst] - \
  232.          wyœwietla ogłoszenie");
  233.         SendClientMessage(playerid, COLOR_YELLOW, "/lockall(la) - zamyka wszystkie pojazdy; \
  234.          /unlockall(ula) - otwiera wszystkie pojazdy");
  235.         SendClientMessage(playerid, COLOR_YELLOW, "/medic(md) [ID gracza] - \
  236.          ulecza wskazanego gracza; /armor(a) [ID gracza]  - daje pancerz wskazanemu graczowi");
  237.         SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicle(rv) [ID gracza] - \
  238.          naprawia pojazd wskazanego gracza");
  239.         SendClientMessage(playerid, COLOR_YELLOW, "/teleportto(tpto) [ID gracza] - \
  240.          teleportuje Cię do innego gracza");
  241.         SendClientMessage(playerid, COLOR_YELLOW, "/teleporthere(tphere) [ID gracza] - \
  242.          teleportuje innego gracza do Ciebie");
  243.         SendClientMessage(playerid, COLOR_YELLOW, "/teleport(tp) [ID gracza] [ID gracza] - \
  244.          teleportuje gracza do innego gracza");
  245.         SendClientMessage(playerid, COLOR_YELLOW, "/teleportloc(tpl) [slot] - \
  246.          teleportuje Cię do zapisanej pozycji zapisanej przy użyciu /setloc(sl) [slot]");
  247.     }
  248.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  249.     {
  250.         SendClientMessage(playerid, COLOR_YELLOW, "/givegun(gg) [ID gracza] [ID broni] [Amunicja] - \
  251.          daje broń wskazanemu graczowi");
  252.         SendClientMessage(playerid, COLOR_YELLOW, "/givegunall(gga) [ID broni] [Amunicja] - \
  253.          daje broń wszystkim graczom");
  254.         SendClientMessage(playerid, COLOR_YELLOW, "/disarm(d) [ID gracza] - \
  255.          rozbraja wskazanego gracza");
  256.         SendClientMessage(playerid, COLOR_YELLOW, "/disarmall(da) - \
  257.          rozbraja wszystkich graczy");
  258.         SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
  259.          wyłšczasz/włšczasz swojš skrzynkę PM");
  260.         SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
  261.          blokujesz wskazanemu graczowi możliwoœć wysyłania wiadomoœci");
  262.         SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
  263.          komenda o działaniu odwrotnym do powyższej");
  264.         SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
  265.          czyœci czat");
  266.     }
  267.     SendClientMessage(playerid, COLOR_ORANGE, "/rac3 - poprzednia strona <> /rac5 - następna strona");
  268.     return 1;
  269. }
  270.  
  271. dcmd_rac5(playerid, cmdtext[])
  272. {
  273. #pragma unused cmdtext
  274.  
  275.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  276.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  277.  
  278.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  279.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  280.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  281.  
  282.     if(g_player_info[playerid][E_admin_lvl] == 1)
  283.     {
  284.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  285.     }
  286.     else if(g_player_info[playerid][E_admin_lvl] == 2)
  287.     {
  288.         SendClientMessage(playerid, COLOR_YELLOW, "/givecash(gc) [ID gracza] [kwota] - \
  289.          dodaje kwotę do portfela gracza; /givebank(gb) [ID gracza] [kwota] - dodaje kwotę do konta gracza");
  290.         SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
  291.          respawnuje nieużywane pojazdy");
  292.         SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
  293.          zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
  294.         SendClientMessage(playerid, COLOR_YELLOW, "/pmeye - podglšd PMów");
  295.         SendClientMessage(playerid, COLOR_YELLOW, "/payday - wymusza rozdanie wypłat");
  296.         SendClientMessage(playerid, COLOR_YELLOW, "/slotto - wymusza losowanie; /jackpot [kwota] - zmienia stawkę w loterii");
  297.         SendClientMessage(playerid, COLOR_YELLOW, "/god - włšcza godmode; /givegod [ID gracza] - włšcz godmode wskazanej osobie");
  298.         SendClientMessage(playerid, COLOR_YELLOW, "/vehgod - włšcz godmode pojazdu");
  299.     }
  300.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  301.     {
  302.         SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
  303.          obserwujesz wskazanego gracza");
  304.         SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
  305.          wyłšcza tryb podglšdu gracza");
  306.         SendClientMessage(playerid, COLOR_YELLOW, "/announce(ann) [Czas] [Tekst] - \
  307.          wyœwietla ogłoszenie");
  308.         SendClientMessage(playerid, COLOR_YELLOW, "/lockall(la) - zamyka wszystkie pojazdy; \
  309.          /unlockall(ula) - otwiera wszystkie pojazdy");
  310.         SendClientMessage(playerid, COLOR_YELLOW, "/medic(md) [ID gracza] - \
  311.          ulecza wskazanego gracza; /armor(a) [ID gracza]  - daje pancerz wskazanemu graczowi");
  312.         SendClientMessage(playerid, COLOR_YELLOW, "/medicall(ma) - ulecza wszystkich graczy; \
  313.          /armorall(aa) - daje pancerz wszystkim graczom");
  314.         SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicle(rv) [ID gracza] - \
  315.          naprawia pojazd wskazanego gracza");
  316.         SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicleall(rva) - \
  317.          naprawia wszystkie pojazdy");
  318.     }
  319.     SendClientMessage(playerid, COLOR_ORANGE, "/rac4 - poprzednia strona <> /rac6 - następna strona");
  320.     return 1;
  321. }
  322.  
  323. dcmd_rac6(playerid, cmdtext[])
  324. {
  325. #pragma unused cmdtext
  326.  
  327.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  328.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  329.  
  330.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  331.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  332.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  333.  
  334.     if(g_player_info[playerid][E_admin_lvl] == 1)
  335.     {
  336.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  337.     }
  338.     if(g_player_info[playerid][E_admin_lvl] == 2)
  339.     {
  340.         SendClientMessage(playerid, COLOR_YELLOW, "/explode [ID gracza] - wysadza wskazanego gracza w powietrze");
  341.         SendClientMessage(playerid, COLOR_YELLOW, "/eject [ID gracza] - wyrzuca gracza z pojazdu");
  342.         SendClientMessage(playerid, COLOR_YELLOW, "/setskin [ID gracza] [ID skinu] - ustawia graczowi skin");
  343.         SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
  344.            ignoruje wskazanego gracza");
  345.     }
  346.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  347.     {
  348.         SendClientMessage(playerid, COLOR_YELLOW, "/givecash(gc) [ID gracza] [kwota] - \
  349.          dodaje kwotę do portfela gracza; /givebank(gb) [ID gracza] [kwota] - dodaje kwotę do konta gracza");
  350.         SendClientMessage(playerid, COLOR_YELLOW, "/givecashall(gca) [kwota] - \
  351.          dodaje kwotę do portfeli graczy; /givebankall(gba) [kwota] - dodaje kwotę do kont graczy");
  352.         SendClientMessage(playerid, COLOR_YELLOW, "/teleportto(tpto) [ID gracza] - \
  353.          teleportuje Cię do innego gracza");
  354.         SendClientMessage(playerid, COLOR_YELLOW, "/teleporthere(tphere) [ID gracza] - \
  355.          teleportuje innego gracza do Ciebie");
  356.         SendClientMessage(playerid, COLOR_YELLOW, "/teleport(tp) [ID gracza] [ID gracza] - \
  357.          teleportuje gracza do innego gracza");
  358.         SendClientMessage(playerid, COLOR_YELLOW, "/teleportloc(tpl) [slot] - \
  359.          teleportuje Cię do zapisanej pozycji zapisanej przy użyciu /setloc(sl) [slot]");
  360.         SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
  361.          respawnuje nieużywane pojazdy");
  362.         SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
  363.          zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
  364.     }
  365.     SendClientMessage(playerid, COLOR_ORANGE, "/rac5 - poprzednia strona <> /rac7 - następna strona");
  366.     return 1;
  367. }
  368.  
  369. dcmd_rac7(playerid, cmdtext[])
  370. {
  371. #pragma unused cmdtext
  372.  
  373.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  374.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  375.  
  376.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  377.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  378.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  379.  
  380.     if(g_player_info[playerid][E_admin_lvl] == 1)
  381.     {
  382.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  383.     }
  384.     if(g_player_info[playerid][E_admin_lvl] == 2)
  385.     {
  386.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  387.     }
  388.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  389.     {
  390.         SendClientMessage(playerid, COLOR_YELLOW, "/lastlogin [Nazwa konta] - \
  391.          podaje datę ostatniego logowania na wskazanym koncie");
  392.         SendClientMessage(playerid, COLOR_YELLOW, "/createinterior [i] [x] [y] [z] [a] [komentarz] - \
  393.          zapisuje interior w spisie");
  394.         SendClientMessage(playerid, COLOR_YELLOW, "/interiorslist - wyœwietla spis interiorów");
  395.         SendClientMessage(playerid, COLOR_YELLOW, "/createhome [Interior ID] [Cena] - tworzy dom");
  396.         SendClientMessage(playerid, COLOR_YELLOW, "/sethomecarspawn [ID domu] - zmienia spawn pojazdu przed domem");
  397.         SendClientMessage(playerid, COLOR_YELLOW, "/createprop [Typ] [Interior ID] [Cena] [Zysk] [Zysk z wejœcia] - \
  398.          tworzy przedsiębiorstwo");
  399.         SendClientMessage(playerid, COLOR_YELLOW, "/getid - wyœwietla ID domu/przedsiębiorstwa; \
  400.          /reset - resetuje dom/przedsiebiorstwo; /reservation - wykonuje rezerwację");
  401.     }
  402.     SendClientMessage(playerid, COLOR_ORANGE, "/rac6 - poprzednia strona <> /rac8 - następna strona");
  403.     return 1;
  404. }
  405.  
  406. dcmd_rac8(playerid, cmdtext[])
  407. {
  408. #pragma unused cmdtext
  409.  
  410.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  411.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  412.  
  413.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  414.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  415.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  416.  
  417.     if(g_player_info[playerid][E_admin_lvl] == 1)
  418.     {
  419.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  420.     }
  421.     if(g_player_info[playerid][E_admin_lvl] == 2)
  422.     {
  423.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  424.     }
  425.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  426.     {
  427.         SendClientMessage(playerid, COLOR_YELLOW, "/payday - wymusza rozdanie wypłat");
  428.         SendClientMessage(playerid, COLOR_YELLOW, "/slotto - wymusza losowanie; /jackpot [kwota] - zmienia stawkę w loterii");
  429.         SendClientMessage(playerid, COLOR_YELLOW, "/god - włšcza godmode; /givegod [ID gracza] - włšcz godmode wskazanej osobie");
  430.         SendClientMessage(playerid, COLOR_YELLOW, "/vehgod - włšcz godmode pojazdu");
  431.         SendClientMessage(playerid, COLOR_YELLOW, "/creategang [ID lidera] [Tag] [Kolor] [Kolor strefy] - tworzy gang");
  432.         SendClientMessage(playerid, COLOR_YELLOW, "/deletegang [Tag] - kasuje gang");
  433.         SendClientMessage(playerid, COLOR_YELLOW, "/setleader [ID gangu] [ID lidera] - \
  434.          przekazuje władzę nad gangiem wskazanemu graczowi");
  435.         SendClientMessage(playerid, COLOR_YELLOW, "/givezone [ID gracza] - \
  436.          przekazuje strefę gangowi; /removezone - resetuje strefę");
  437.     }
  438.     SendClientMessage(playerid, COLOR_ORANGE, "/rac7 - poprzednia strona <> /rac9 - następna strona");
  439.     return 1;
  440. }
  441.  
  442. dcmd_rac9(playerid, cmdtext[])
  443. {
  444. #pragma unused cmdtext
  445.  
  446.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  447.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  448.  
  449.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  450.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  451.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  452.  
  453.     if(g_player_info[playerid][E_admin_lvl] == 1)
  454.     {
  455.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  456.     }
  457.     if(g_player_info[playerid][E_admin_lvl] == 2)
  458.     {
  459.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  460.     }
  461.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  462.     {
  463.         SendClientMessage(playerid, COLOR_YELLOW, "/eye - podglšd komend");
  464.         SendClientMessage(playerid, COLOR_YELLOW, "/pmeye - podglšd PMów");
  465.         SendClientMessage(playerid, COLOR_YELLOW, "/explode [ID gracza] - wysadza wskazanego gracza w powietrze");
  466.         SendClientMessage(playerid, COLOR_YELLOW, "/adlist - wyœwietla listę ogłoszeń");
  467.         SendClientMessage(playerid, COLOR_YELLOW, "/delad [ID ogłoszenia] - usuwa ogłoszenie");
  468.         SendClientMessage(playerid, COLOR_YELLOW, "/addad [opis] [tekst] - dodaje ogłoszenie");
  469.         SendClientMessage(playerid, COLOR_YELLOW, "/adrotate - zmienia ogłoszenie na następne");
  470.         SendClientMessage(playerid, COLOR_YELLOW, "/eject [ID gracza] - wyrzuca gracza z pojazdu");
  471.     }
  472.     SendClientMessage(playerid, COLOR_ORANGE, "/rac8 - poprzednia strona <> /rac10 - następna strona");
  473.     return 1;
  474. }
  475.  
  476. dcmd_rac10(playerid, cmdtext[])
  477. {
  478.     #pragma unused cmdtext
  479.  
  480.     if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
  481.         return ERRORMSG(playerid, "Brak uprawnień!") & 1;
  482.  
  483.     format(ftext, sizeof(ftext), "%s - Panel %sa:", \
  484.      MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
  485.     SendClientMessage(playerid, COLOR_BLUE, ftext);
  486.  
  487.     if(g_player_info[playerid][E_admin_lvl] == 1)
  488.     {
  489.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  490.     }
  491.     if(g_player_info[playerid][E_admin_lvl] == 2)
  492.     {
  493.         SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
  494.     }
  495.     else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  496.     {
  497.         SendClientMessage(playerid, COLOR_YELLOW, "/setskin [ID gracza] [ID skinu] - ustawia graczowi skin");
  498.         SendClientMessage(playerid, COLOR_YELLOW, "/setvip [ID gracza] 0/1 - zmienia graczowi status VIPa");
  499.         SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
  500.            ignoruje wskazanego gracza");
  501.     }
  502.     SendClientMessage(playerid, COLOR_ORANGE, "/rac9 - poprzednia strona");
  503.     return 1;
  504. }
  505.  
  506. dcmd_setadminlevel(playerid, cmdtext[])
  507. {
  508.     new
  509.         id,
  510.         a_lvl;
  511.  
  512.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  513.     {
  514.         if(sscanf(cmdtext, "ui", id, a_lvl))
  515.             return ERRORMSG(playerid, "WPISZ: /setadminlevel [id gracza] [lvl]") & 1;
  516.  
  517.         if(!IsPlayerConnected(id))
  518.             return ERRORMSG(playerid, "Błędne id grcza!") & 1;
  519.  
  520.         if(g_player_info[id][E_admin_lvl] == 4)
  521.             return ERRORMSG(playerid, "Nie możesz zmienić uprawnien coderowi!") & 1;
  522.  
  523.         if(a_lvl == 4 && !IsPlayerAdmin(playerid))
  524.             return ERRORMSG(playerid, "Nie możesz ustawić uprawniej codera nie logujšc się na rcon!") & 1;
  525.  
  526.         if(a_lvl < 0 || a_lvl > 4)
  527.             return ERRORMSG(playerid, "Błędny poziom uprawnien! Wybież liczbe z \
  528.              zakresu 0 - 4") & 1;
  529.  
  530.         if(g_player_info[id][E_admin_lvl] < a_lvl)
  531.             SendClientMessage(id, COLOR_GREEN, "Twoje uprawnienia zostały \
  532.              zwiększone");
  533.  
  534.         if(g_player_info[id][E_admin_lvl] > a_lvl)
  535.             SendClientMessage(id, COLOR_GREEN, "Twoje uprawnienia zostały \
  536.              zmniejszone");
  537.  
  538.         g_player_info[id][E_admin_lvl] = a_lvl;
  539.  
  540.         format(ftext, sizeof(ftext), "Nadałeœ rangę %s dla gracza %s (ID %d)",
  541.          AdminLevelName(a_lvl), PlayerName(id), id);
  542.  
  543.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  544.  
  545.         format(ftext, sizeof(ftext), "Twój obecny poziom uprawnień to: %s",
  546.          AdminLevelName(a_lvl));
  547.  
  548.         SendClientMessage(id, COLOR_GREEN, ftext);
  549.  
  550.         printf("%s nadal range %s dla gracza %s", PlayerName(playerid),
  551.          AdminLevelName(a_lvl), PlayerName(id));
  552.  
  553.         return 1;
  554.     }
  555.  
  556.     ERRORMSG(playerid, "Brak uprawnień!");
  557.     return 1;
  558. }
  559.  
  560. dcmd_kick(playerid, cmdtext[])
  561. {
  562.     new
  563.         id,
  564.         reason[80];
  565.  
  566.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  567.     {
  568.         if(sscanf(cmdtext, "us", id, reason))
  569.             return ERRORMSG(playerid, "WPISZ: /kick [id gracza] [powód]") & 1;
  570.  
  571.         if(!IsPlayerConnected(id))
  572.             return ERRORMSG(playerid, "Błędne id grcza!") & 1;
  573.  
  574.         KickMsg(id, PlayerName(playerid), reason);
  575.  
  576.         return 1;
  577.     }
  578.  
  579.     ERRORMSG(playerid, "Brak uprawnień!");
  580.     return 1;
  581. }
  582.  
  583. dcmd_k(playerid, cmdtext[])
  584.     return dcmd_kick(playerid, cmdtext);
  585.  
  586. dcmd_ban(playerid, cmdtext[])
  587. {
  588.     new
  589.         id,
  590.         reason[80];
  591.  
  592.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  593.     {
  594.         if(sscanf(cmdtext, "us", id, reason))
  595.             return ERRORMSG(playerid, "WPISZ: /ban [id gracza] [powód]") & 1;
  596.  
  597.         if(!IsPlayerConnected(id))
  598.             return ERRORMSG(playerid, "Błędne id grcza!") & 1;
  599.  
  600.         BanMsg(id, PlayerName(playerid), reason);
  601.  
  602.         return 1;
  603.     }
  604.  
  605.     ERRORMSG(playerid, "Brak uprawnień!");
  606.     return 1;
  607. }
  608.  
  609. dcmd_b(playerid, cmdtext[])
  610.     return dcmd_ban(playerid, cmdtext);
  611.  
  612. dcmd_delacc(playerid, cmdtext[])
  613. {
  614.     new
  615.         uid,
  616.         pid,
  617.         hid,
  618.         DBResult:result,
  619.         field[15],
  620.         acc_name[24];
  621.  
  622.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  623.     {
  624.         if(sscanf(cmdtext, "z", acc_name))
  625.             return ERRORMSG(playerid, "WPISZ: /delacc [nazwa konta]") & 1;
  626.  
  627.         format(query, sizeof(query), "SELECT uid, home_id, prop_id FROM players WHERE name = '%s';", acc_name);
  628.  
  629.         result = db_query(g_server_info[E_global_db], query);
  630.  
  631.         db_get_field(result, 0, field, sizeof(field));
  632.         uid = strval(field);
  633.         db_get_field(result, 1, field, sizeof(field));
  634.         hid = strval(field);
  635.         db_get_field(result, 2, field, sizeof(field));
  636.         pid = strval(field);
  637.  
  638.         db_free_result(result);
  639.  
  640.         if(!uid)
  641.             return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
  642.  
  643.         DeleteHouse(hid);
  644.         DeletePropertie(pid);
  645.  
  646.         Update3DTextLabelText(g_house_info[hid][E_owner], COLOR_GREEN, "Na sprzedaż");
  647.         Update3DTextLabelText(g_prop_info[pid][E_owner], COLOR_GREEN, "Na sprzedaż");
  648.  
  649.         format(query, sizeof(query), "DELETE FROM players WHERE uid = %d", uid);
  650.         dbquery(g_server_info[E_global_db], query);
  651.  
  652.         format(query, sizeof(query), "DELETE FROM warns WHERE uid = %d", uid);
  653.         dbquery(g_server_info[E_global_db], query);
  654.  
  655.         format(query, sizeof(query), "DELETE FROM praises WHERE uid = %d", uid);
  656.         dbquery(g_server_info[E_global_db], query);
  657.  
  658.         format(ftext, sizeof(ftext), "Konto %s zostało skasowane przez %s", acc_name,
  659.          PlayerName(playerid));
  660.  
  661.         SendClientMessageToAll(COLOR_ORANGE, ftext);
  662.  
  663.         printf("Konto %s zostalo skasowane przez %s", acc_name,
  664.          PlayerName(playerid));
  665.  
  666.         return 1;
  667.     }
  668.  
  669.     ERRORMSG(playerid, "Brak uprawnień!");
  670.     return 1;
  671. }
  672.  
  673. dcmd_dac(playerid, cmdtext[])
  674.     return dcmd_delacc(playerid, cmdtext);
  675.  
  676. dcmd_banacc(playerid, cmdtext[])
  677. {
  678.     new
  679.         uid,
  680.         field[15],
  681.         acc_name[24];
  682.  
  683.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  684.     {
  685.         if(sscanf(cmdtext, "z", acc_name))
  686.             return ERRORMSG(playerid, "WPISZ: /banacc [nazwa konta]") & 1;
  687.  
  688.         format(query, sizeof(query), "SELECT uid FROM players WHERE name = '%s';", acc_name);
  689.  
  690.         getfield(g_server_info[E_global_db], query, 0, field, sizeof(field));
  691.         uid = strval(field);
  692.  
  693.         if(!uid)
  694.             return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
  695.  
  696.         BanAcc(acc_name);
  697.  
  698.  
  699.         format(ftext, sizeof(ftext), "Konto %s zostało zbanowane przez %s", acc_name,
  700.          PlayerName(playerid));
  701.  
  702.         SendClientMessageToAll(COLOR_ORANGE, ftext);
  703.  
  704.         printf("Konto %s zostalo zbanowane przez %s", acc_name,
  705.           PlayerName(playerid));
  706.  
  707.         return 1;
  708.     }
  709.  
  710.     ERRORMSG(playerid, "Brak uprawnień!");
  711.     return 1;
  712. }
  713.  
  714. dcmd_ba(playerid, cmdtext[])
  715.     return dcmd_banacc(playerid, cmdtext);
  716.  
  717. dcmd_unbanacc(playerid, cmdtext[])
  718. {
  719.     new
  720.         uid,
  721.         field[15],
  722.         acc_name[24];
  723.  
  724.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  725.     {
  726.         if(sscanf(cmdtext, "z", acc_name))
  727.             return ERRORMSG(playerid, "WPISZ: /unbanacc [nazwa konta]") & 1;
  728.  
  729.         format(query, sizeof(query), "SELECT uid FROM players WHERE name = '%s';", acc_name);
  730.  
  731.         getfield(g_server_info[E_global_db], query, 0, field, sizeof(field));
  732.         uid = strval(field);
  733.  
  734.         if(!uid)
  735.             return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
  736.  
  737.         UnBanAcc(acc_name);
  738.  
  739.         format(ftext, sizeof(ftext), "Konto %s zostało odbanowane przez %s", acc_name,
  740.          PlayerName(playerid));
  741.  
  742.         SendClientMessageToAll(COLOR_ORANGE, ftext);
  743.  
  744.         return 1;
  745.     }
  746.  
  747.     ERRORMSG(playerid, "Brak uprawnień!");
  748.     return 1;
  749. }
  750.  
  751. dcmd_unba(playerid, cmdtext[])
  752.     return dcmd_banacc(playerid, cmdtext);
  753.  
  754. dcmd_banip(playerid, cmdtext[])
  755. {
  756.     new ip[16];
  757.  
  758.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  759.     {
  760.         if(sscanf(cmdtext, "z", ip))
  761.             return ERRORMSG(playerid, "WPISZ: /banip [ip]") & 1;
  762.  
  763.         format(ftext, sizeof(ftext), "banip %s", ip);
  764.         SendRconCommand(ftext);
  765.  
  766.         format(ftext, sizeof(ftext), "IP %s zostało zbanowane przez %s", ip,
  767.          PlayerName(playerid));
  768.  
  769.         SendClientMessageToAll(COLOR_ORANGE, ftext);
  770.         return 1;
  771.     }
  772.  
  773.     ERRORMSG(playerid, "Brak uprawnień!");
  774.     return 1;
  775. }
  776.  
  777. dcmd_bip(playerid, cmdtext[])
  778.     return dcmd_banip(playerid, cmdtext);
  779.  
  780.  
  781. dcmd_unban(playerid, cmdtext[])
  782. {
  783.     new ip[16];
  784.  
  785.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  786.     {
  787.         if(sscanf(cmdtext, "z", ip))
  788.             return ERRORMSG(playerid, "WPISZ: /unban [ip]") & 1;
  789.  
  790.         format(ftext, sizeof(ftext), "unbanip %s", ip);
  791.         SendRconCommand(ftext);
  792.         SendRconCommand("reloadbans");
  793.  
  794.         format(ftext, sizeof(ftext), "IP %s zostało odbanowane przez %s", ip,
  795.          PlayerName(playerid));
  796.  
  797.         SendClientMessageToAll(COLOR_ORANGE, ftext);
  798.         return 1;
  799.     }
  800.  
  801.     ERRORMSG(playerid, "Brak uprawnień!");
  802.     return 1;
  803. }
  804.  
  805. dcmd_unb(playerid, cmdtext[])
  806.     return dcmd_unban(playerid, cmdtext);
  807.  
  808. dcmd_playerinfo(playerid, cmdtext[])
  809. {
  810.     new id;
  811.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  812.     {
  813.         if(sscanf(cmdtext, "u", id))
  814.             return ERRORMSG(playerid, "WPISZ /playerinfo [id gracza]") & 1;
  815.  
  816.         if(!IsPlayerConnected(id))
  817.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  818.  
  819.         ShowPlayerStats(id, playerid);
  820.  
  821.         return 1;
  822.     }
  823.  
  824.     ERRORMSG(playerid, "Brak uprawnień!");
  825.     return 1;
  826. }
  827.  
  828. dcmd_pi(playerid, cmdtext[])
  829.     return dcmd_playerinfo(playerid, cmdtext);
  830.  
  831. dcmd_warn(playerid, cmdtext[])
  832. {
  833.     new
  834.         id,
  835.         reason[80];
  836.  
  837.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  838.     {
  839.         if(sscanf(cmdtext, "us", id, reason))
  840.             return ERRORMSG(playerid, "WPISZ /warn [id gracza] [powod]") & 1;
  841.  
  842.         if(!IsPlayerConnected(id))
  843.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  844.  
  845.         GiveWarn(id, PlayerName(playerid), reason);
  846.  
  847.         return 1;
  848.     }
  849.  
  850.     ERRORMSG(playerid, "Brak uprawnień!");
  851.     return 1;
  852. }
  853.  
  854. dcmd_w(playerid, cmdtext[])
  855.     return dcmd_warn(playerid, cmdtext);
  856.  
  857. dcmd_readwarns(playerid, cmdtext[])
  858. {
  859.     new id;
  860.  
  861.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  862.     {
  863.         if(sscanf(cmdtext, "u", id))
  864.             return ERRORMSG(playerid, "WPISZ /readwarns [id gracza]") & 1;
  865.  
  866.         if(!IsPlayerConnected(id))
  867.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  868.  
  869.         ReadWarns(id, playerid);
  870.  
  871.         return 1;
  872.     }
  873.  
  874.     ERRORMSG(playerid, "Brak uprawnień!");
  875.     return 1;
  876. }
  877.  
  878. dcmd_rw(playerid, cmdtext[])
  879.     return dcmd_readwarns(playerid, cmdtext);
  880.  
  881. dcmd_deletewarn(playerid, cmdtext[])
  882. {
  883.     new
  884.         id,
  885.         w_id;
  886.  
  887.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  888.     {
  889.         if(sscanf(cmdtext, "ui", id, w_id))
  890.             return ERRORMSG(playerid, "WPISZ /deletewarn [id gracza] [warn id]") & 1;
  891.  
  892.         if(!IsPlayerConnected(id))
  893.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  894.  
  895.         DeleteWarn(id, w_id);
  896.  
  897.         SendClientMessage(playerid, COLOR_ORANGE, "Ostrzeżenie zostało usunięte!");
  898.         SendClientMessage(id, COLOR_GREEN, "Jedno z Twoich ostrzeżeń zostało usunięte!");
  899.         return 1;
  900.     }
  901.  
  902.     ERRORMSG(playerid, "Brak uprawnień!");
  903.     return 1;
  904. }
  905.  
  906. dcmd_dw(playerid, cmdtext[])
  907.     return dcmd_deletewarn(playerid, cmdtext);
  908.  
  909.  
  910. dcmd_praise(playerid, cmdtext[])
  911. {
  912.     new
  913.         id,
  914.         reason[80];
  915.  
  916.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  917.     {
  918.         if(sscanf(cmdtext, "us", id, reason))
  919.             return ERRORMSG(playerid, "WPISZ /praise [id gracza] [powod]") & 1;
  920.  
  921.         if(!IsPlayerConnected(id))
  922.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  923.  
  924.         GivePraise(id, PlayerName(playerid), reason);
  925.  
  926.         return 1;
  927.     }
  928.  
  929.     ERRORMSG(playerid, "Brak uprawnień!");
  930.     return 1;
  931. }
  932.  
  933. dcmd_p(playerid, cmdtext[])
  934.     return dcmd_praise(playerid, cmdtext);
  935.  
  936. dcmd_readpraises(playerid, cmdtext[])
  937. {
  938.     new id;
  939.  
  940.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  941.     {
  942.         if(sscanf(cmdtext, "u", id))
  943.             return ERRORMSG(playerid, "WPISZ /readpraises [id gracza]") & 1;
  944.  
  945.         if(!IsPlayerConnected(id))
  946.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  947.  
  948.         ReadPraises(id, playerid);
  949.  
  950.         return 1;
  951.     }
  952.  
  953.     ERRORMSG(playerid, "Brak uprawnień!");
  954.     return 1;
  955. }
  956.  
  957. dcmd_rp(playerid, cmdtext[])
  958.     return dcmd_readpraises(playerid, cmdtext);
  959.  
  960. dcmd_deletepraise(playerid, cmdtext[])
  961. {
  962.     new
  963.         id,
  964.         p_id;
  965.  
  966.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  967.     {
  968.         if(sscanf(cmdtext, "ui", id, p_id))
  969.             return ERRORMSG(playerid, "WPISZ /deletepraise [id gracza] [warn id]") & 1;
  970.  
  971.         if(!IsPlayerConnected(id))
  972.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  973.  
  974.         DeletePraise(id, p_id);
  975.  
  976.         SendClientMessage(playerid, COLOR_ORANGE, "Pochwała została usunięta!");
  977.         SendClientMessage(id, COLOR_GREEN, "Jedna z Twoich pochwał została usunięta!");
  978.         return 1;
  979.     }
  980.  
  981.     ERRORMSG(playerid, "Brak uprawnień!");
  982.     return 1;
  983. }
  984.  
  985. dcmd_dp(playerid, cmdtext[])
  986.     return dcmd_deletepraise(playerid, cmdtext);
  987.  
  988. dcmd_jail(playerid, cmdtext[])
  989. {
  990.     new
  991.         id,
  992.         time,
  993.         reason[80];
  994.  
  995.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  996.     {
  997.         if(sscanf(cmdtext, "uis", id, time, reason))
  998.             return ERRORMSG(playerid, "WPISZ: /jail [id gracza] [czas] [powod]") & 1;
  999.  
  1000.         if(!IsPlayerConnected(id))
  1001.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1002.  
  1003.         if(time <= 0)
  1004.             return ERRORMSG(playerid, "Błędny czas! Minimalna kara to 1 min.") & 1;
  1005.  
  1006.         JailMsg(id, PlayerName(playerid), reason, (time * 60));
  1007.  
  1008.         return 1;
  1009.     }
  1010.  
  1011.     ERRORMSG(playerid, "Brak uprawnień!");
  1012.     return 1;
  1013. }
  1014.  
  1015. dcmd_j(playerid, cmdtext[])
  1016.     return dcmd_jail(playerid, cmdtext);
  1017.  
  1018. dcmd_unjail(playerid, cmdtext[])
  1019. {
  1020.     new id;
  1021.  
  1022.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1023.     {
  1024.         if(sscanf(cmdtext, "u", id))
  1025.             return ERRORMSG(playerid, "WPISZ: /unjail [id gracza]") & 1;
  1026.  
  1027.         if(!IsPlayerConnected(id))
  1028.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1029.  
  1030.         g_player_info[id][E_jail_time] = 0;
  1031.  
  1032.         Unjail(id, PlayerName(playerid));
  1033.  
  1034.         return 1;
  1035.     }
  1036.  
  1037.     ERRORMSG(playerid, "Brak uprawnień!");
  1038.     return 1;
  1039. }
  1040.  
  1041. dcmd_uj(playerid, cmdtext[])
  1042.     return dcmd_unjail(playerid, cmdtext);
  1043.  
  1044.  
  1045. dcmd_freeze(playerid, cmdtext[])
  1046. {
  1047.     new id;
  1048.  
  1049.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1050.     {
  1051.         if(sscanf(cmdtext, "u", id))
  1052.             return ERRORMSG(playerid, "WPISZ: /freez [id gracza]") & 1;
  1053.  
  1054.         if(!IsPlayerConnected(id))
  1055.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1056.  
  1057.         TogglePlayerControllable(id, 0);
  1058.  
  1059.         format(ftext, sizeof(ftext), "%s został zamrożony przez %sa %s", PlayerName(id),
  1060.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1061.  
  1062.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1063.  
  1064.         return 1;
  1065.     }
  1066.  
  1067.     ERRORMSG(playerid, "Brak uprawnień!");
  1068.     return 1;
  1069. }
  1070.  
  1071. dcmd_f(playerid, cmdtext[])
  1072.     return dcmd_freeze(playerid, cmdtext);
  1073.  
  1074. dcmd_unfreeze(playerid, cmdtext[])
  1075. {
  1076.     new id;
  1077.  
  1078.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1079.     {
  1080.         if(sscanf(cmdtext, "u", id))
  1081.             return ERRORMSG(playerid, "WPISZ: /unfreez [id gracza]") & 1;
  1082.  
  1083.         if(!IsPlayerConnected(id))
  1084.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1085.  
  1086.         TogglePlayerControllable(id, 1);
  1087.  
  1088.         format(ftext, sizeof(ftext), "%s został odmrożony przez %sa %s", PlayerName(id),
  1089.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1090.  
  1091.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1092.  
  1093.         return 1;
  1094.     }
  1095.  
  1096.     ERRORMSG(playerid, "Brak uprawnień!");
  1097.     return 1;
  1098. }
  1099.  
  1100. dcmd_uf(playerid, cmdtext[])
  1101.     return dcmd_unfreeze(playerid, cmdtext);
  1102.  
  1103.  
  1104. dcmd_setgravity(playerid, cmdtext[])
  1105. {
  1106.     new Float:gravity;
  1107.  
  1108.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1109.     {
  1110.         if(sscanf(cmdtext, "f", gravity))
  1111.             return ERRORMSG(playerid, "WPISZ: /setgravity [gravity]") &1;
  1112.  
  1113.         if(gravity < -0.025 || gravity > 0.025)
  1114.             return ERRORMSG(playerid, "Grawitację możesz ustawiać w przedziale \
  1115.              -0.025 - 0.025") & 1;
  1116.  
  1117.         format(ftext, sizeof(ftext), "Grawitacja została zmieniona na %f przez \
  1118.          %sa %s", gravity, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1119.          PlayerName(playerid));
  1120.  
  1121.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1122.         SetGravity(gravity);
  1123.  
  1124.         return 1;
  1125.     }
  1126.  
  1127.     ERRORMSG(playerid, "Brak uprawnień!");
  1128.     return 1;
  1129. }
  1130.  
  1131. dcmd_sg(playerid, cmdtext[])
  1132.     return dcmd_setgravity(playerid, cmdtext);
  1133.  
  1134.  
  1135. dcmd_setweather(playerid, cmdtext[])
  1136. {
  1137.     new weather;
  1138.  
  1139.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1140.     {
  1141.         if(sscanf(cmdtext, "d", weather))
  1142.             return ERRORMSG(playerid, "WPISZ: /setweather [weather]") &1;
  1143.  
  1144.         if(weather < 0 || weather > 45)
  1145.             return ERRORMSG(playerid, "Pogodę możesz ustawiać w przedziale \
  1146.              0 - 45") & 1;
  1147.  
  1148.         format(ftext, sizeof(ftext), "Pogoda została zmieniona na %d przez \
  1149.          %sa %s", weather, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1150.          PlayerName(playerid));
  1151.  
  1152.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1153.         SetWeather(weather);
  1154.  
  1155.         return 1;
  1156.     }
  1157.  
  1158.     ERRORMSG(playerid, "Brak uprawnień!");
  1159.     return 1;
  1160. }
  1161.  
  1162. dcmd_sw(playerid, cmdtext[])
  1163.     return dcmd_setweather(playerid, cmdtext);
  1164.  
  1165.  
  1166. dcmd_settime(playerid, cmdtext[])
  1167. {
  1168.     new hour;
  1169.  
  1170.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1171.     {
  1172.         if(sscanf(cmdtext, "d", hour))
  1173.             return ERRORMSG(playerid, "WPISZ: /settime [godzina]") &1;
  1174.  
  1175.         if(hour < 0 || hour > 23)
  1176.             return ERRORMSG(playerid, "Godzinę możesz ustawiać w przedziale \
  1177.              0 - 23") & 1;
  1178.  
  1179.         format(ftext, sizeof(ftext), "Godzina została zmieniona na %d przez \
  1180.          %sa %s", hour, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1181.          PlayerName(playerid));
  1182.  
  1183.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1184.         SetWorldTime(hour);
  1185.  
  1186.         return 1;
  1187.     }
  1188.  
  1189.     ERRORMSG(playerid, "Brak uprawnień!");
  1190.     return 1;
  1191. }
  1192.  
  1193. dcmd_st(playerid, cmdtext[])
  1194.     return dcmd_settime(playerid, cmdtext);
  1195.  
  1196.  
  1197. dcmd_gunlist(playerid, cmdtext[])
  1198. {
  1199.     #pragma unused cmdtext
  1200.  
  1201.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1202.     {
  1203.         SendClientMessage(playerid, COLOR_BLUE, ADMPANEL" - Lista broni:");
  1204.  
  1205.         SendClientMessage(playerid, COLOR_YELLOW, "0 Pięœć; 1 Kastet; 2 Kij Golf\
  1206.          owy; 3 Pałka Policyjna; 4 Nóż; 5 Kij Baseballowy;");
  1207.  
  1208.         SendClientMessage(playerid, COLOR_YELLOW, "6 Łopata; 7 Kij Bilardowy; 8 \
  1209.          Katana; 9 Piła Łańcuchowa; 10 Różowy Wibrator;");
  1210.  
  1211.         SendClientMessage(playerid, COLOR_YELLOW, "11 Biały Wibrator; 12 Długi \
  1212.          Wibrator; 13 Biały Wibrator 2; 14 Kwiaty; 15 Laska;");
  1213.  
  1214.         SendClientMessage(playerid, COLOR_YELLOW, "16 Granaty; 17 Gaz Łzawišcy; \
  1215.          22 9mm; 23 9mm Z Tłumikiem; 24 Desert Eagle;");
  1216.  
  1217.         SendClientMessage(playerid, COLOR_YELLOW, "25 Shotgun; 26 Sawn Off Shotg\
  1218.          un; 27 Combat Shotgun; 28 Mac10; 29 MP5; 30 AK47;");
  1219.  
  1220.         SendClientMessage(playerid, COLOR_YELLOW, "31 M4; 32 Tec9; 33 Karabin; \
  1221.          34 Snajperka; 35 RPG; 36 Wyrzutnia Rakiet; 37 Miotacz ognia;");
  1222.  
  1223.         SendClientMessage(playerid, COLOR_YELLOW, "38 Minigun; 39 Ładunki Wybuch\
  1224.          owe; 41 Spray; 42 Gaœnica; 43 Aparat; 44 Noktowizor;");
  1225.  
  1226.         SendClientMessage(playerid, COLOR_YELLOW, "45 Termowizor; 46 Spadochron");
  1227.         return 1;
  1228.     }
  1229.  
  1230.     ERRORMSG(playerid, "Brak uprawnień!");
  1231.     return 1;
  1232. }
  1233.  
  1234. dcmd_gl(playerid, cmdtext[])
  1235.     return dcmd_gunlist(playerid, cmdtext);
  1236.  
  1237. dcmd_gun(playerid, cmdtext[])
  1238. {
  1239.     new
  1240.         weapon,
  1241.         ammo;
  1242.  
  1243.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1244.     {
  1245.         if(sscanf(cmdtext, "dd", weapon, ammo))
  1246.             return ERRORMSG(playerid, "WPISZ: /gun [id broni] [amunicja]") & 1;
  1247.  
  1248.         if(weapon < 0 || weapon > 46)
  1249.             return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
  1250.              dzić dostępne bronie.") & 1;
  1251.  
  1252.         if(ammo < 0 || ammo > 99999)
  1253.             return ERRORMSG(playerid, "Zła iloœć amunicji!") & 1;
  1254.  
  1255.         GivePlayerWeapon(playerid, weapon, ammo);
  1256.         format(ftext, sizeof(ftext), "Otrzymałeœ broń %s (ID: %d) z %d amunicji",
  1257.          ReturnWeaponName(weapon), weapon, ammo);
  1258.  
  1259.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  1260.  
  1261.         return 1;
  1262.     }
  1263.  
  1264.     ERRORMSG(playerid, "Brak uprawnień!");
  1265.     return 1;
  1266. }
  1267.  
  1268. dcmd_g(playerid, cmdtext[])
  1269.     return dcmd_gun(playerid, cmdtext);
  1270.  
  1271. dcmd_gunpack(playerid, cmdtext[])
  1272. {
  1273.     #pragma unused cmdtext
  1274.  
  1275.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1276.     {
  1277.         GivePlayerWeapon(playerid, 1, 1);
  1278.         GivePlayerWeapon(playerid, 4, 1);
  1279.         GivePlayerWeapon(playerid, 24, 10000);
  1280.         GivePlayerWeapon(playerid, 26, 10000);
  1281.         GivePlayerWeapon(playerid, 32, 10000);
  1282.         GivePlayerWeapon(playerid, 31, 10000);
  1283.         GivePlayerWeapon(playerid, 34, 10000);
  1284.  
  1285.         SendClientMessage(playerid, COLOR_GREEN, "Otrzymałeœ zestaw broni");
  1286.  
  1287.         return 1;
  1288.     }
  1289.  
  1290.     ERRORMSG(playerid, "Brak uprawnień!");
  1291.     return 1;
  1292. }
  1293.  
  1294. dcmd_gp(playerid, cmdtext[])
  1295.     return dcmd_gunpack(playerid, cmdtext);
  1296.  
  1297. dcmd_givegun(playerid, cmdtext[])
  1298. {
  1299.     new
  1300.         id,
  1301.         weapon,
  1302.         ammo;
  1303.  
  1304.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1305.     {
  1306.         if(sscanf(cmdtext, "udd", id, weapon, ammo))
  1307.             return ERRORMSG(playerid, "WPISZ: /givegun [id gracza] [id broni] [amunicja]") & 1;
  1308.  
  1309.         if(!IsPlayerConnected(id))
  1310.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1311.  
  1312.         if(weapon < 0 || weapon > 46)
  1313.             return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
  1314.              dzić dostępne bronie.") & 1;
  1315.  
  1316.         if(ammo < 0 || ammo > 99999)
  1317.             return ERRORMSG(playerid, "Zła iloœć amunicji!") & 1;
  1318.  
  1319.         GivePlayerWeapon(id, weapon, ammo);
  1320.         format(ftext, sizeof(ftext), "Otrzymałeœ broń %s (ID: %d) z %d amunicji \
  1321.          od %sa %s", ReturnWeaponName(weapon), weapon, ammo,
  1322.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1323.  
  1324.         SendClientMessage(id, COLOR_GREEN, ftext);
  1325.  
  1326.         format(ftext, sizeof(ftext), "Dałeœ %s (ID: %d) broń %s (ID: %d) z %d amunicji",
  1327.          PlayerName(id), id, ReturnWeaponName(weapon), weapon, ammo);
  1328.  
  1329.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  1330.  
  1331.         return 1;
  1332.     }
  1333.  
  1334.     ERRORMSG(playerid, "Brak uprawnień!");
  1335.     return 1;
  1336. }
  1337.  
  1338. dcmd_gg(playerid, cmdtext[])
  1339.     return dcmd_givegun(playerid, cmdtext);
  1340.  
  1341. dcmd_givegunall(playerid, cmdtext[])
  1342. {
  1343.     new
  1344.         weapon,
  1345.         ammo;
  1346.  
  1347.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1348.     {
  1349.         if(sscanf(cmdtext, "dd", weapon, ammo))
  1350.             return ERRORMSG(playerid, "WPISZ: /givegunall [id broni] [amunicja]") & 1;
  1351.  
  1352.         if(weapon < 0 || weapon > 46)
  1353.             return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
  1354.              dzić dostępne bronie.") & 1;
  1355.  
  1356.         if(ammo < 0 || ammo > 99999)
  1357.             return ERRORMSG(playerid, "Zła iloœć amunicji!") & 1;
  1358.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1359.         {
  1360.             if(!IsPlayerConnected(i))
  1361.                 continue;
  1362.  
  1363.             GivePlayerWeapon(playerid, weapon, ammo);
  1364.         }
  1365.  
  1366.         format(ftext, sizeof(ftext), "%sa %s dał wszystkim broń %s.",
  1367.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid),
  1368.          ReturnWeaponName(weapon));
  1369.  
  1370.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1371.  
  1372.         return 1;
  1373.     }
  1374.  
  1375.     ERRORMSG(playerid, "Brak uprawnień!");
  1376.     return 1;
  1377. }
  1378.  
  1379. dcmd_gga(playerid, cmdtext[])
  1380.     return dcmd_givegunall(playerid, cmdtext);
  1381.  
  1382. dcmd_disarm(playerid, cmdtext[])
  1383. {
  1384.     new id;
  1385.  
  1386.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1387.     {
  1388.         if(sscanf(cmdtext, "u", id))
  1389.             return ERRORMSG(playerid, "WPISZ /disarm [id gracza]") & 1;
  1390.  
  1391.         if(!IsPlayerConnected(id))
  1392.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1393.  
  1394.         ResetPlayerWeapons(id);
  1395.  
  1396.         format(ftext, sizeof(ftext), "Zostałeœ rozbrojony przez %s", PlayerName(playerid));
  1397.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  1398.  
  1399.         format(ftext, sizeof(ftext), "%s (ID: %d) został rozbrojony przez %sa %s",
  1400.          PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1401.          PlayerName(playerid));
  1402.  
  1403.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1404.         return 1;
  1405.     }
  1406.  
  1407.     ERRORMSG(playerid, "Brak uprawnień!");
  1408.     return 1;
  1409. }
  1410.  
  1411. dcmd_d(playerid, cmdtext[])
  1412.     return dcmd_disarm(playerid, cmdtext);
  1413.  
  1414. dcmd_disarmall(playerid, cmdtext[])
  1415. {
  1416.     #pragma unused cmdtext
  1417.  
  1418.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1419.     {
  1420.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1421.         {
  1422.             if(!IsPlayerConnected(i))
  1423.                 continue;
  1424.  
  1425.             ResetPlayerWeapons(i);
  1426.         }
  1427.  
  1428.         format(ftext, sizeof(ftext), "Wszyscy zostali rozbrojeni przez %sa %s",
  1429.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1430.  
  1431.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1432.         return 1;
  1433.     }
  1434.  
  1435.     ERRORMSG(playerid, "Brak uprawnień!");
  1436.     return 1;
  1437. }
  1438.  
  1439. dcmd_da(playerid, cmdtext[])
  1440.     return dcmd_disarmall(playerid, cmdtext);
  1441.  
  1442. dcmd_mute(playerid, cmdtext[])
  1443. {
  1444.     new id;
  1445.  
  1446.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1447.     {
  1448.         if(sscanf(cmdtext, "u", id))
  1449.             return ERRORMSG(playerid, "WPISZ /mute [id gracza]") & 1;
  1450.  
  1451.         if(!IsPlayerConnected(id))
  1452.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1453.  
  1454.         g_player_info[id][E_is_muted] = true;
  1455.  
  1456.         format(ftext, sizeof(ftext), "Zostałeœ uciszony przez %s", PlayerName(playerid));
  1457.         SendClientMessage(id, COLOR_YELLOW, ftext);
  1458.  
  1459.         format(ftext, sizeof(ftext), "Uciszyłeœ %s (ID: %d)", PlayerName(id), id);
  1460.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  1461.  
  1462.         if(g_player_info[id][E_Uid])
  1463.         {
  1464.             format(query, sizeof(query), "INSERT INTO muted_players VALUES(%d);", g_player_info[id][E_Uid]);
  1465.             dbquery(g_server_info[E_global_db], query);
  1466.         }
  1467.  
  1468.         return 1;
  1469.     }
  1470.  
  1471.     ERRORMSG(playerid, "Brak uprawnień!");
  1472.     return 1;
  1473. }
  1474.  
  1475. dcmd_m(playerid, cmdtext[])
  1476.     return dcmd_mute(playerid, cmdtext);
  1477.  
  1478. dcmd_unmute(playerid, cmdtext[])
  1479. {
  1480.     new id;
  1481.  
  1482.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1483.     {
  1484.         if(sscanf(cmdtext, "u", id))
  1485.             return ERRORMSG(playerid, "WPISZ /unmute [id gracza]") & 1;
  1486.  
  1487.         if(!IsPlayerConnected(id))
  1488.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1489.  
  1490.         g_player_info[id][E_is_muted] = false;
  1491.  
  1492.         format(ftext, sizeof(ftext), "%s przywrócił Ci możliwoœć pisania na czacie",
  1493.          PlayerName(playerid));
  1494.         SendClientMessage(id, COLOR_YELLOW, ftext);
  1495.  
  1496.         format(ftext, sizeof(ftext), "przywróciłeœ możliwoœć pisania na czacie \
  1497.          %s (ID: %d)", PlayerName(id), id);
  1498.  
  1499.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  1500.  
  1501.         format(query, sizeof(query), "DELETE FROM muted_players WHERE uid = %d;", g_player_info[id][E_Uid]);
  1502.         dbquery(g_server_info[E_global_db], query);
  1503.  
  1504.         return 1;
  1505.     }
  1506.  
  1507.     ERRORMSG(playerid, "Brak uprawnień!");
  1508.     return 1;
  1509. }
  1510.  
  1511. dcmd_um(playerid, cmdtext[])
  1512.     return dcmd_unmute(playerid, cmdtext);
  1513.  
  1514. dcmd_spectate(playerid, cmdtext[])
  1515. {
  1516.     new id;
  1517.  
  1518.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1519.     {
  1520.         if(sscanf(cmdtext, "u", id))
  1521.             return ERRORMSG(playerid, "WPISZ /spectate [id gracza]") & 1;
  1522.  
  1523.         if(!IsPlayerConnected(id) || id == playerid)
  1524.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1525.  
  1526.         if(GetPlayerState(id) == PLAYER_STATE_SPECTATING || GetPlayerState(id) == PLAYER_STATE_NONE || GetPlayerState(id) == PLAYER_STATE_WASTED)
  1527.             return ERRORMSG(playerid, "Nie możesz spectować gracza który się jeszcze nie zrespił!") & 1;
  1528.  
  1529.         new interior = GetPlayerInterior(id);
  1530.         SetPlayerInterior(playerid, interior);
  1531.         new vworld = GetPlayerVirtualWorld(id);
  1532.         SetPlayerVirtualWorld(playerid, vworld);
  1533.         TogglePlayerSpectating(playerid, 1);
  1534.  
  1535.         if(IsPlayerInAnyVehicle(id))
  1536.         {
  1537.             TogglePlayerControllable(playerid, 0);
  1538.             PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id), SPECTATE_MODE_NORMAL);
  1539.         }
  1540.         else
  1541.         {
  1542.             TogglePlayerControllable(playerid, 1);
  1543.             PlayerSpectatePlayer(playerid, id);
  1544.         }
  1545.  
  1546.         g_player_info[playerid][E_specting] = id;
  1547.         g_player_info[id][E_is_spected] = true;
  1548.  
  1549.         format(ftext, sizeof(ftext), "Obserwujesz gracza %s (ID: %d)",
  1550.          PlayerName(id), g_player_info[playerid][E_specting]);
  1551.  
  1552.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  1553.  
  1554.         return 1;
  1555.     }
  1556.  
  1557.     ERRORMSG(playerid, "Brak uprawnień!");
  1558.     return 1;
  1559. }
  1560.  
  1561. dcmd_spec(playerid, cmdtext[])
  1562.     return dcmd_spectate(playerid, cmdtext);
  1563.  
  1564. dcmd_spectateoff(playerid, cmdtext[])
  1565. {
  1566.     #pragma unused cmdtext
  1567.  
  1568.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1569.     {
  1570.         TogglePlayerSpectating(playerid, 0);
  1571.         TogglePlayerControllable(playerid, 1);
  1572.         g_player_info[playerid][E_specting] = -1;
  1573.  
  1574.         SendClientMessage(playerid, COLOR_GREEN, "Wyłšczyłeœ tryb podglšdu.");
  1575.         return 1;
  1576.     }
  1577.  
  1578.     ERRORMSG(playerid, "Brak uprawnień!");
  1579.     return 1;
  1580. }
  1581.  
  1582. dcmd_specoff(playerid, cmdtext[])
  1583.     return dcmd_spectateoff(playerid, cmdtext);
  1584.  
  1585. dcmd_clearchat(playerid, cmdtext[])
  1586. {
  1587.     #pragma unused cmdtext
  1588.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  1589.         return BlankMsg(100) & 1;
  1590.  
  1591.     ERRORMSG(playerid, "Brak uprawnień!");
  1592.     return 1;
  1593. }
  1594.  
  1595. dcmd_cc(playerid, cmdtext[])
  1596.     return dcmd_clearchat(playerid, cmdtext);
  1597.  
  1598. dcmd_announce(playerid, cmdtext[])
  1599. {
  1600.     new
  1601.         time,
  1602.         ann_text[120];
  1603.  
  1604.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1605.     {
  1606.         if(sscanf(cmdtext, "is", time, ann_text))
  1607.             return ERRORMSG(playerid, "WPISZ: /announce [czas] [tekst]") & 1;
  1608.  
  1609.         GameTextForAll(ann_text, (time * 1000), 1);
  1610.         return 1;
  1611.     }
  1612.  
  1613.     ERRORMSG(playerid, "Brak uprawnień!");
  1614.     return 1;
  1615. }
  1616.  
  1617. dcmd_ann(playerid, cmdtext[])
  1618.     return dcmd_announce(playerid, cmdtext);
  1619.  
  1620. dcmd_lockall(playerid, cmdtext[])
  1621. {
  1622.     #pragma unused cmdtext
  1623.  
  1624.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1625.     {
  1626.         for(new i; i < MAX_VEHICLES; i++)
  1627.             g_veh_info[i][E_locked] = true;
  1628.  
  1629.         format(ftext, sizeof(ftext), "Wszystkie pojazdy na mapie zostały zamknię\
  1630.          te przez %sa %s!",
  1631.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1632.  
  1633.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1634.         return 1;
  1635.     }
  1636.  
  1637.     ERRORMSG(playerid, "Brak uprawnień!");
  1638.     return 1;
  1639. }
  1640.  
  1641. dcmd_la(playerid, cmdtext[])
  1642.     return dcmd_lockall(playerid, cmdtext);
  1643.  
  1644.  
  1645. dcmd_unlockall(playerid, cmdtext[])
  1646. {
  1647.     #pragma unused cmdtext
  1648.  
  1649.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1650.     {
  1651.         for(new i; i < MAX_VEHICLES; i++)
  1652.             g_veh_info[i][E_locked] = false;
  1653.  
  1654.         format(ftext, sizeof(ftext), "Wszystkie pojazdy na mapie zostały otwarte\
  1655.          przez %sa %s!",
  1656.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1657.  
  1658.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1659.         return 1;
  1660.     }
  1661.  
  1662.     ERRORMSG(playerid, "Brak uprawnień!");
  1663.     return 1;
  1664. }
  1665.  
  1666. dcmd_ula(playerid, cmdtext[])
  1667.     return dcmd_unlockall(playerid, cmdtext);
  1668.  
  1669. dcmd_medic(playerid, cmdtext[])
  1670. {
  1671.     new id;
  1672.  
  1673.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1674.     {
  1675.         if(sscanf(cmdtext, "u", id))
  1676.         {
  1677.             SetPlayerHealth2(playerid, 100.0);
  1678.             return ERRORMSG(playerid, "WPISZ: /medic [id gracza] aby uleczyć inn\
  1679.              ego gracza") & 1;
  1680.  
  1681.         }
  1682.  
  1683.         if(!IsPlayerConnected(id))
  1684.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1685.  
  1686.         SetPlayerHealth2(id, 100.0);
  1687.         format(ftext, sizeof(ftext), "%s (ID: %d) został uleczony przez %sa %s",
  1688.          PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1689.          PlayerName(playerid));
  1690.  
  1691.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1692.         return 1;
  1693.     }
  1694.  
  1695.     ERRORMSG(playerid, "Brak uprawnień!");
  1696.     return 1;
  1697. }
  1698.  
  1699. dcmd_md(playerid, cmdtext[])
  1700.     return dcmd_medic(playerid, cmdtext);
  1701.  
  1702. dcmd_medicall(playerid, cmdtext[])
  1703. {
  1704.     #pragma unused cmdtext
  1705.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1706.     {
  1707.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1708.         {
  1709.             if(!IsPlayerConnected(i))
  1710.                 continue;
  1711.  
  1712.             SetPlayerHealth2(i, 100.0);
  1713.         }
  1714.  
  1715.         format(ftext, sizeof(ftext), "Wszyscy zostali uleczeni przez %sa %s",
  1716.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1717.  
  1718.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1719.  
  1720.         return 1;
  1721.     }
  1722.  
  1723.     ERRORMSG(playerid, "Brak uprawnień!");
  1724.     return 1;
  1725. }
  1726.  
  1727. dcmd_ma(playerid, cmdtext[])
  1728.     return dcmd_medicall(playerid, cmdtext);
  1729.  
  1730.  
  1731. dcmd_armor(playerid, cmdtext[])
  1732. {
  1733.     new id;
  1734.  
  1735.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1736.     {
  1737.         if(sscanf(cmdtext, "u", id))
  1738.         {
  1739.             SetPlayerArmour2(playerid, 100.0);
  1740.             return ERRORMSG(playerid, "WPISZ: /armor [id gracza] aby dać kamize\
  1741.              lke dla innego gracza") & 1;
  1742.  
  1743.         }
  1744.  
  1745.         if(!IsPlayerConnected(id))
  1746.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1747.  
  1748.         SetPlayerArmour2(id, 100.0);
  1749.         format(ftext, sizeof(ftext), "%s (ID: %d) dostał kamizelke od %sa %s",
  1750.          PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1751.          PlayerName(playerid));
  1752.  
  1753.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1754.         return 1;
  1755.     }
  1756.  
  1757.     ERRORMSG(playerid, "Brak uprawnień!");
  1758.     return 1;
  1759. }
  1760.  
  1761. dcmd_a(playerid, cmdtext[])
  1762.     return dcmd_armor(playerid, cmdtext);
  1763.  
  1764. dcmd_armorall(playerid, cmdtext[])
  1765. {
  1766.     #pragma unused cmdtext
  1767.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1768.     {
  1769.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1770.         {
  1771.             if(!IsPlayerConnected(i))
  1772.                 continue;
  1773.  
  1774.             SetPlayerArmour2(i, 100.0);
  1775.         }
  1776.  
  1777.         format(ftext, sizeof(ftext), "Wszyscy dostali kamizelki od %sa %s",
  1778.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1779.  
  1780.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1781.  
  1782.         return 1;
  1783.     }
  1784.  
  1785.  
  1786.     ERRORMSG(playerid, "Brak uprawnień!");
  1787.     return 1;
  1788. }
  1789.  
  1790. dcmd_aa(playerid, cmdtext[])
  1791.     return dcmd_armorall(playerid, cmdtext);
  1792.  
  1793.  
  1794. dcmd_repairvehicle(playerid, cmdtext[])
  1795. {
  1796.     new id;
  1797.  
  1798.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1799.     {
  1800.         if(sscanf(cmdtext, "u", id))
  1801.         {
  1802.             if(IsPlayerInAnyVehicle(playerid))
  1803.                 RepairVehicle(GetPlayerVehicleID(playerid));
  1804.             return ERRORMSG(playerid, "WPISZ: /repairvehicle [id gracza] aby \
  1805.              naprawić pojazd innego gracza") & 1;
  1806.  
  1807.         }
  1808.  
  1809.         if(!IsPlayerConnected(id))
  1810.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  1811.  
  1812.         if(!IsPlayerInAnyVehicle(id))
  1813.         {
  1814.             format(ftext, sizeof(ftext), "%s nie jest w pojeŸdzie!", PlayerName(id));
  1815.             return ERRORMSG(playerid, ftext) & 1;
  1816.         }
  1817.  
  1818.         RepairVehicle(GetPlayerVehicleID(id));
  1819.         format(ftext, sizeof(ftext), "Pojazd %s (ID: %d) został naprawiony przez %sa %s",
  1820.          PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  1821.          PlayerName(playerid));
  1822.  
  1823.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1824.         return 1;
  1825.     }
  1826.  
  1827.     ERRORMSG(playerid, "Brak uprawnień!");
  1828.     return 1;
  1829. }
  1830.  
  1831. dcmd_rv(playerid, cmdtext[])
  1832.     return dcmd_repairvehicle(playerid, cmdtext);
  1833.  
  1834. dcmd_repairvehicleall(playerid, cmdtext[])
  1835. {
  1836.     #pragma unused cmdtext
  1837.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1838.     {
  1839.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1840.         {
  1841.             if(!IsPlayerConnected(i))
  1842.                 continue;
  1843.  
  1844.             RepairVehicle(GetPlayerVehicleID(i));
  1845.         }
  1846.  
  1847.         format(ftext, sizeof(ftext), "Wszystkie pojazdy zostały naprawione przez %sa %s",
  1848.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  1849.  
  1850.         SendClientMessageToAll(COLOR_BLUE, ftext);
  1851.  
  1852.         return 1;
  1853.     }
  1854.  
  1855.     ERRORMSG(playerid, "Brak uprawnień!");
  1856.     return 1;
  1857. }
  1858.  
  1859. dcmd_rva(playerid, cmdtext[])
  1860.     return dcmd_repairvehicleall(playerid, cmdtext);
  1861.  
  1862. dcmd_givecash(playerid, cmdtext[])
  1863. {
  1864.     new
  1865.         money,
  1866.         id;
  1867.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1868.     {
  1869.         if(sscanf(cmdtext, "ui", id, money))
  1870.             return ERRORMSG(playerid, "WPISZ: /givecash [id gracza] [kwota]") & 1;
  1871.  
  1872.         if(!IsPlayerConnected(id))
  1873.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  1874.  
  1875.         if(money == 0)
  1876.             return ERRORMSG(playerid, "Błędna kwota") & 1;
  1877.  
  1878.         if(money > 0)
  1879.         {
  1880.             format(ftext, sizeof(ftext), "Daleœ %d$ graczowi %s (ID: %d).",money,
  1881.              PlayerName(id), id);
  1882.  
  1883.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1884.             format(ftext, sizeof(ftext), "%s Dał Tobie %d$.", PlayerName(playerid), money);
  1885.             SendClientMessage(id, COLOR_GREEN, ftext);
  1886.         }
  1887.         if(money < 0)
  1888.         {
  1889.             format(ftext, sizeof(ftext), "Zabrałeœ %d$ graczowi %s (ID: %d).", -money,
  1890.              PlayerName(id), id);
  1891.  
  1892.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1893.             format(ftext, sizeof(ftext), "%s zabrał Tobie %d$.", PlayerName(playerid), -money);
  1894.             SendClientMessage(id, COLOR_GREEN, ftext);
  1895.         }
  1896.  
  1897.         GivePlayerMoney2(id, money);
  1898.         return 1;
  1899.     }
  1900.  
  1901.     ERRORMSG(playerid, "Brak uprawnień!");
  1902.     return 1;
  1903. }
  1904.  
  1905. dcmd_gc(playerid, cmdtext[])
  1906.     return dcmd_givecash(playerid, cmdtext);
  1907.  
  1908. dcmd_givecashall(playerid, cmdtext[])
  1909. {
  1910.     new money;
  1911.  
  1912.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  1913.     {
  1914.         if(sscanf(cmdtext, "i", money))
  1915.             return ERRORMSG(playerid, "WPISZ: /givecashall [kwota]") & 1;
  1916.  
  1917.         if(money == 0)
  1918.             return ERRORMSG(playerid, "Błędna kwota") & 1;
  1919.  
  1920.         if(money > 0)
  1921.         {
  1922.             format(ftext, sizeof(ftext), "Dałeœ %d$ wszystkim graczom.", money);
  1923.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1924.  
  1925.             format(ftext, sizeof(ftext), "%s dał wszystkim %d$.", PlayerName(playerid), money);
  1926.             SendClientMessageToAll(COLOR_BLUE, ftext);
  1927.         }
  1928.  
  1929.         if(money < 0)
  1930.         {
  1931.             format(ftext, sizeof(ftext), "Zabrałeœ %d$ wszystkim graczom.", -money);
  1932.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1933.  
  1934.             format(ftext, sizeof(ftext), "%s zabrał wszystkim %d$.", PlayerName(playerid), -money);
  1935.             SendClientMessageToAll(COLOR_BLUE, ftext);
  1936.         }
  1937.  
  1938.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  1939.         {
  1940.             if(!IsPlayerConnected(i))
  1941.                 continue;
  1942.  
  1943.             GivePlayerMoney2(i, money);
  1944.         }
  1945.  
  1946.         return 1;
  1947.     }
  1948.  
  1949.     ERRORMSG(playerid, "Brak uprawnień!");
  1950.     return 1;
  1951. }
  1952.  
  1953. dcmd_gca(playerid, cmdtext[])
  1954.     return dcmd_givecashall(playerid, cmdtext);
  1955.  
  1956. dcmd_givebank(playerid, cmdtext[])
  1957. {
  1958.     new
  1959.         money,
  1960.         id;
  1961.  
  1962.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  1963.     {
  1964.         if(sscanf(cmdtext, "ud", id, money))
  1965.             return ERRORMSG(playerid, "WPISZ /givebank [id gracza] [kwota]") & 1;
  1966.  
  1967.         if(!IsPlayerConnected(id))
  1968.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  1969.  
  1970.         if(money == 0)
  1971.             return ERRORMSG(playerid, "Błędna kwota") & 1;
  1972.  
  1973.         if(money > 0)
  1974.         {
  1975.             format(ftext, sizeof(ftext), "Dodałeœ %d$ graczowi %s (ID: %d) do je\
  1976.              go konta bankowego.", money, PlayerName(id), id);
  1977.  
  1978.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1979.             format(ftext, sizeof(ftext), "%s dodał Tobie %d$ do konta bankowego.",
  1980.              PlayerName(playerid), money);
  1981.  
  1982.             SendClientMessage(id, COLOR_GREEN, ftext);
  1983.         }
  1984.  
  1985.         if(money < 0)
  1986.         {
  1987.             format(ftext, sizeof(ftext), "Zabrałeœ %d$ graczowi %s (ID: %d) z konta.",
  1988.              -money, PlayerName(id), id);
  1989.  
  1990.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  1991.             format(ftext, sizeof(ftext), "%s zabrał Tobie %d$ z konta.",
  1992.              PlayerName(playerid), -money);
  1993.  
  1994.             SendClientMessage(id, COLOR_GREEN, ftext);
  1995.         }
  1996.  
  1997.         g_player_info[id][E_money_in_bank] += money;
  1998.  
  1999.         return 1;
  2000.     }
  2001.  
  2002.     ERRORMSG(playerid, "Brak uprawnień!");
  2003.     return 1;
  2004. }
  2005.  
  2006. dcmd_gb(playerid, cmdtext[])
  2007.     return dcmd_givebank(playerid, cmdtext);
  2008.  
  2009. dcmd_givebankall(playerid, cmdtext[])
  2010. {
  2011.     new money;
  2012.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2013.     {
  2014.         if(sscanf(cmdtext, "d", money))
  2015.             return ERRORMSG(playerid, "WPISZ /givebankall [kwota]") & 1;
  2016.  
  2017.         if(money == 0)
  2018.             return ERRORMSG(playerid, "Błędna kwota") & 1;
  2019.  
  2020.         if(money > 0)
  2021.         {
  2022.             format(ftext, sizeof(ftext), "Dodałeœ %d$ wszystkim do ich kont bank\
  2023.              owych.", money);
  2024.  
  2025.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  2026.             format(ftext, sizeof(ftext), "%s dodał wszystkim %d$ do konta bankowego.",
  2027.              PlayerName(playerid), money);
  2028.  
  2029.             SendClientMessageToAll(COLOR_BLUE, ftext);
  2030.         }
  2031.  
  2032.         if(money < 0)
  2033.         {
  2034.             format(ftext, sizeof(ftext), "Zabrałeœ %d$ wszystkim graczom z ich kont.",
  2035.              -money);
  2036.  
  2037.             SendClientMessage(playerid, COLOR_GREEN, ftext);
  2038.             format(ftext, sizeof(ftext), "%s zabrał wszystkim %d$ z konta bankowego.",
  2039.              PlayerName(playerid), -money);
  2040.  
  2041.             SendClientMessageToAll(COLOR_BLUE, ftext);
  2042.         }
  2043.  
  2044.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  2045.         {
  2046.             if(!IsPlayerConnected(i))
  2047.                 continue;
  2048.  
  2049.             g_player_info[i][E_money_in_bank] += money;
  2050.         }
  2051.  
  2052.         return 1;
  2053.     }
  2054.  
  2055.     ERRORMSG(playerid, "Brak uprawnień!");
  2056.     return 1;
  2057. }
  2058.  
  2059. dcmd_gba(playerid, cmdtext[])
  2060.     return dcmd_givebankall(playerid, cmdtext);
  2061.  
  2062. dcmd_teleportto(playerid, cmdtext[])
  2063. {
  2064.     new id;
  2065.  
  2066.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2067.     {
  2068.         if(sscanf(cmdtext, "u", id))
  2069.             return ERRORMSG(playerid, "WPISZ: /teleportto [id gracza]") & 1;
  2070.  
  2071.         if(!IsPlayerConnected(id))
  2072.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  2073.  
  2074.         TeleportPlayerToPlayer(playerid, id);
  2075.  
  2076.         format(ftext, sizeof(ftext), "Teleportowałeœ się do %s (ID: %d).",
  2077.          PlayerName(id), id);
  2078.  
  2079.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  2080.  
  2081.         format(ftext, sizeof(ftext), "%s teleportował się do Ciebie.",
  2082.          PlayerName(playerid));
  2083.  
  2084.         SendClientMessage(id, COLOR_GREEN, ftext);
  2085.         return 1;
  2086.     }
  2087.  
  2088.     ERRORMSG(playerid, "Brak uprawnień!");
  2089.     return 1;
  2090. }
  2091.  
  2092. dcmd_tpto(playerid, cmdtext[])
  2093.     return dcmd_teleportto(playerid, cmdtext);
  2094.  
  2095. dcmd_teleporthere(playerid, cmdtext[])
  2096. {
  2097.     new id;
  2098.  
  2099.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2100.     {
  2101.         if(sscanf(cmdtext, "u", id))
  2102.             return ERRORMSG(playerid, "WPISZ: /teleporthere [id gracza]") & 1;
  2103.  
  2104.         if(!IsPlayerConnected(id))
  2105.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  2106.  
  2107.         TeleportPlayerToPlayer(id, playerid);
  2108.  
  2109.         format(ftext, sizeof(ftext), "Teleportowałeœ %s (ID: %d) do siebie.",
  2110.          PlayerName(id), id);
  2111.  
  2112.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  2113.  
  2114.         format(ftext, sizeof(ftext), "%s teleportował Cię do siebie.",
  2115.          PlayerName(playerid));
  2116.  
  2117.         SendClientMessage(id, COLOR_GREEN, ftext);
  2118.         return 1;
  2119.     }
  2120.  
  2121.     ERRORMSG(playerid, "Brak uprawnień!");
  2122.     return 1;
  2123. }
  2124.  
  2125. dcmd_tphere(playerid, cmdtext[])
  2126.     return dcmd_teleporthere(playerid, cmdtext);
  2127.  
  2128.  
  2129. dcmd_teleport(playerid, cmdtext[])
  2130. {
  2131.     new
  2132.         id,
  2133.         to_id;
  2134.  
  2135.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2136.     {
  2137.         if(sscanf(cmdtext, "uu", id, to_id))
  2138.             return ERRORMSG(playerid, "WPISZ: /teleport [id gracza] [do gracza]") & 1;
  2139.  
  2140.         if(!IsPlayerConnected(id) || !IsPlayerConnected(to_id))
  2141.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  2142.  
  2143.         TeleportPlayerToPlayer(id, to_id);
  2144.  
  2145.         format(ftext, sizeof(ftext), "Teleportowałeœ %s (ID: %d) do %s (ID: %d).",
  2146.          PlayerName(id), id, PlayerName(to_id), to_id);
  2147.  
  2148.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  2149.  
  2150.         format(ftext, sizeof(ftext), "%s teleportował Cię do %s.",
  2151.          PlayerName(playerid), PlayerName(to_id));
  2152.  
  2153.         SendClientMessage(id, COLOR_GREEN, ftext);
  2154.  
  2155.         format(ftext, sizeof(ftext), "%s teleportował %s do Ciebie.",
  2156.          PlayerName(playerid), PlayerName(id));
  2157.  
  2158.         SendClientMessage(to_id, COLOR_GREEN, ftext);
  2159.         return 1;
  2160.     }
  2161.  
  2162.     ERRORMSG(playerid, "Brak uprawnień!");
  2163.     return 1;
  2164. }
  2165.  
  2166. dcmd_tp(playerid, cmdtext[])
  2167.     return dcmd_teleport(playerid, cmdtext);
  2168.  
  2169.  
  2170. dcmd_respawncars(playerid, cmdtext[])
  2171. {
  2172.     #pragma unused cmdtext
  2173.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2174.     {
  2175.         for(new i; i < MAX_VEHICLES; i++)
  2176.             if(!IsVehicleInUse(i))
  2177.                 SetVehicleToRespawn(i);
  2178.  
  2179.         format(ftext, sizeof(ftext), "Pojazdy na mapie zostały zrespawnowane pr\
  2180.          zez %sa %s", AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  2181.          PlayerName(playerid));
  2182.  
  2183.         SendClientMessageToAll(COLOR_BLUE, ftext);
  2184.  
  2185.         return 1;
  2186.     }
  2187.  
  2188.     ERRORMSG(playerid, "Brak uprawnień!");
  2189.     return 1;
  2190. }
  2191.  
  2192. dcmd_rc(playerid, cmdtext[])
  2193.     return dcmd_respawncars(playerid, cmdtext);
  2194.  
  2195. dcmd_eye(playerid, cmdtext[])
  2196. {
  2197.     #pragma unused cmdtext
  2198.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2199.     {
  2200.         g_player_info[playerid][E_eye] = !g_player_info[playerid][E_eye];
  2201.  
  2202.         if(g_player_info[playerid][E_eye])
  2203.             SendClientMessage(playerid, COLOR_GREEN, "Włšczyłeœ podglšd komend.");
  2204.         else
  2205.             SendClientMessage(playerid, COLOR_ORANGE, "Wyłšczyłeœ podglšd komend.");
  2206.  
  2207.         return 1;
  2208.     }
  2209.  
  2210.     ERRORMSG(playerid, "Brak uprawnień!");
  2211.     return 1;
  2212. }
  2213.  
  2214. dcmd_pmeye(playerid, cmdtext[])
  2215. {
  2216.     #pragma unused cmdtext
  2217.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2218.     {
  2219.         g_player_info[playerid][E_pmeye] = !g_player_info[playerid][E_pmeye];
  2220.  
  2221.         if(g_player_info[playerid][E_pmeye])
  2222.             SendClientMessage(playerid, COLOR_GREEN, "Włšczyłeœ podglšd pmów.");
  2223.         else
  2224.             SendClientMessage(playerid, COLOR_ORANGE, "Wyłšczyłeœ podglšd pmów.");
  2225.  
  2226.         return 1;
  2227.     }
  2228.  
  2229.     ERRORMSG(playerid, "Brak uprawnień!");
  2230.     return 1;
  2231. }
  2232.  
  2233. dcmd_explode(playerid, cmdtext[])
  2234. {
  2235.  
  2236.     new
  2237.         Float:pos[3],
  2238.         id;
  2239.  
  2240.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2241.     {
  2242.         if(sscanf(cmdtext, "u", id))
  2243.             return ERRORMSG(playerid, "WPISZ: /explode [id gracza]") & 1;
  2244.  
  2245.         if(!IsPlayerConnected(id))
  2246.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  2247.  
  2248.         GetPlayerPos(id, pos[0], pos[1], pos[2]);
  2249.         CreateExplosion(pos[0], pos[1], pos[2], 2, 2.0);
  2250.         SendClientMessage(playerid, COLOR_ORANGE, "Zrobione!");
  2251.  
  2252.         return 1;
  2253.     }
  2254.  
  2255.     ERRORMSG(playerid, "Brak uprawnień!");
  2256.     return 1;
  2257. }
  2258.  
  2259. dcmd_gmx(playerid, cmdtext[])
  2260. {
  2261.     #pragma unused cmdtext
  2262.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2263.     {
  2264.         SendClientMessageToAll(COLOR_YELLOW, "Za chwilę nastšpi restart mapy!");
  2265.         SendClientMessageToAll(COLOR_YELLOW, "Zapisywanie danych...");
  2266.         SendRconCommand("gmx");
  2267.  
  2268.         return 1;
  2269.     }
  2270.  
  2271.     ERRORMSG(playerid, "Brak uprawnień!");
  2272.     return 1;
  2273. }
  2274.  
  2275. dcmd_reset(playerid, cmdtext[])
  2276. {
  2277.     #pragma unused cmdtext
  2278.     #define HOUSE_ENTER g_house_info[i][E_enter_pos]
  2279.     #define PROP_ENTER g_prop_info[i][E_enter_pos]
  2280.     new i = 1;
  2281.  
  2282.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2283.     {
  2284.         while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
  2285.         {
  2286.             if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
  2287.              HOUSE_ENTER[2]))
  2288.             {
  2289.                 DeleteHouse(i);
  2290.                 Update3DTextLabelText(g_house_info[i][E_owner], COLOR_GREEN, "Na sprzedaż");
  2291.                 g_house_info[i][E_reserved] = false;
  2292.                 return 1;
  2293.             }
  2294.             i++;
  2295.         }
  2296.  
  2297.         i = 1;
  2298.  
  2299.         while(PROP_ENTER[0] && PROP_ENTER[1] && PROP_ENTER[2])
  2300.         {
  2301.             if(IsPlayerInRangeOfPoint(playerid, 3.0, PROP_ENTER[0], PROP_ENTER[1],
  2302.              PROP_ENTER[2]))
  2303.             {
  2304.                 DeletePropertie(i);
  2305.                 Update3DTextLabelText(g_prop_info[i][E_owner], COLOR_BLUE, "Na sprzedaż");
  2306.                 return 1;
  2307.             }
  2308.             i++;
  2309.         }
  2310.  
  2311.         ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoœci aby jš kupić!");
  2312.  
  2313.         return 1;
  2314.     }
  2315.  
  2316.     ERRORMSG(playerid, "Brak uprawnień!");
  2317.     return 1;
  2318.  
  2319.     #undef HOUSE_ENTER
  2320.     #undef PROP_ENTER
  2321. }
  2322.  
  2323.  
  2324. dcmd_reservation(playerid, cmdtext[])
  2325. {
  2326.     #pragma unused cmdtext
  2327.     #define HOUSE_ENTER g_house_info[i][E_enter_pos]
  2328.     new i = 1;
  2329.  
  2330.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2331.     {
  2332.         while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
  2333.         {
  2334.             if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
  2335.              HOUSE_ENTER[2]))
  2336.             {
  2337.                 g_house_info[i][E_reserved] = true;
  2338.  
  2339.                 format(query, sizeof(query), "UPDATE houses SET uid = -1, \
  2340.                  owner_name = 'Rezerwacja' WHERE hid = %d", i);
  2341.  
  2342.                 dbquery(g_server_info[E_global_db], query);
  2343.  
  2344.                 Update3DTextLabelText(g_house_info[i][E_owner], COLOR_YELLOW, "Rezerwacja");
  2345.                 return 1;
  2346.             }
  2347.             i++;
  2348.         }
  2349.  
  2350.         ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoœci aby jš kupić!");
  2351.  
  2352.         return 1;
  2353.     }
  2354.  
  2355.     ERRORMSG(playerid, "Brak uprawnień!");
  2356.     return 1;
  2357.  
  2358.     #undef HOUSE_ENTER
  2359. }
  2360.  
  2361. dcmd_hideme(playerid, cmdtext[])
  2362. {
  2363.  
  2364.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2365.     {
  2366.         if(!strlen(cmdtext))
  2367.         {
  2368.             g_player_info[playerid][E_is_hiden] = true;
  2369.             SendClientMessage(playerid, COLOR_GREEN, "Twój nick został ukryty");
  2370.             return ERRORMSG(playerid, "WPISZ /hideme [nick] aby zmienić sobie nick") & 1;
  2371.         }
  2372.  
  2373.         format(ftext, sizeof(ftext), "*** %s opuœcił grę (Time-Out)", PlayerName(playerid));
  2374.         SendClientMessageToAll(COLOR_WHITE, ftext);
  2375.         format(ftext, sizeof(ftext), "*** %s dołšczył do gry", cmdtext);
  2376.         SendClientMessageToAll(COLOR_WHITE, ftext);
  2377.  
  2378.         g_player_info[playerid][E_is_hiden] = true;
  2379.         SetPlayerName(playerid, cmdtext);
  2380.  
  2381.         return 1;
  2382.     }
  2383.  
  2384.     ERRORMSG(playerid, "Brak uprawnień!");
  2385.     return 1;
  2386. }
  2387.  
  2388. dcmd_showme(playerid, cmdtext[])
  2389. {
  2390.     #pragma unused cmdtext
  2391.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2392.     {
  2393.         g_player_info[playerid][E_is_hiden] = false;
  2394.         SetPlayerName(playerid, g_player_info[playerid][E_name]);
  2395.  
  2396.         return 1;
  2397.     }
  2398.  
  2399.     ERRORMSG(playerid, "Brak uprawnień!");
  2400.     return 1;
  2401. }
  2402.  
  2403. dcmd_god(playerid, cmdtext[])
  2404. {
  2405.     #pragma unused cmdtext
  2406.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2407.     {
  2408.         SetPlayerHealth2(playerid, FLOAT_INFINITY);
  2409.         SendClientMessage(playerid, COLOR_GREEN, "Włšczyłeœ goda");
  2410.  
  2411.         return 1;
  2412.     }
  2413.  
  2414.     ERRORMSG(playerid, "Brak uprawnień!");
  2415.     return 1;
  2416. }
  2417.  
  2418. dcmd_givegod(playerid, cmdtext[])
  2419. {
  2420.     new id;
  2421.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2422.     {
  2423.         if(sscanf(cmdtext, "u", id))
  2424.             return ERRORMSG(playerid, "WPISZ: /givegod [id gracza]") & 1;
  2425.  
  2426.         if(!IsPlayerConnected(id))
  2427.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  2428.  
  2429.  
  2430.         SetPlayerHealth2(id, FLOAT_INFINITY);
  2431.         format(ftext, sizeof(ftext), "Włšczyłeœ goda dla gracza %s (ID: %d)",
  2432.          PlayerName(id), id);
  2433.  
  2434.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  2435.  
  2436.         format(ftext, sizeof(ftext), "%s %s włšczył Ci goda",
  2437.          AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  2438.  
  2439.         SendClientMessage(id, COLOR_GREEN, ftext);
  2440.  
  2441.         return 1;
  2442.     }
  2443.  
  2444.     ERRORMSG(playerid, "Brak uprawnień!");
  2445.     return 1;
  2446. }
  2447.  
  2448. dcmd_vehgod(playerid, cmdtext[])
  2449. {
  2450.     #pragma unused cmdtext
  2451.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2452.     {
  2453.         if(!IsPlayerInAnyVehicle(playerid))
  2454.             return ERRORMSG(playerid, "Muisz być w pojeŸdzie aby użyć tej komendy") & 1;
  2455.  
  2456.         SetVehicleHealth(GetPlayerVehicleID(playerid), 9999999999.0);
  2457.         SendClientMessage(playerid, COLOR_GREEN, "Włšczyłeœ goda dla pojazdu");
  2458.  
  2459.         return 1;
  2460.     }
  2461.  
  2462.     ERRORMSG(playerid, "Brak uprawnień!");
  2463.     return 1;
  2464. }
  2465.  
  2466. dcmd_slotto(playerid, cmdtext[])
  2467. {
  2468.     #pragma unused cmdtext
  2469.  
  2470.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2471.     {
  2472.         LotteryStart();
  2473.         return 1;
  2474.     }
  2475.  
  2476.     ERRORMSG(playerid, "Brak uprawnień!");
  2477.     return 1;
  2478. }
  2479.  
  2480. dcmd_payday(playerid, cmdtext[])
  2481. {
  2482.     #pragma unused cmdtext
  2483.  
  2484.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2485.     {
  2486.         PayDay();
  2487.         return 1;
  2488.     }
  2489.  
  2490.     ERRORMSG(playerid, "Brak uprawnień!");
  2491.     return 1;
  2492. }
  2493.  
  2494. dcmd_jackpot(playerid, cmdtext[])
  2495. {
  2496.     new moneys;
  2497.  
  2498.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2499.     {
  2500.         if (sscanf(cmdtext, "i", moneys))
  2501.             return ERRORMSG(playerid, "WPISZ: /jackpot [kwota]") & 1;
  2502.  
  2503.         if(moneys == 0)
  2504.             return ERRORMSG(playerid, "Kwota nie może być równa 0") & 1;
  2505.  
  2506.         g_server_info[E_lottery_money] += moneys;
  2507.         SetConfigInt("lotto", g_server_info[E_lottery_money]);
  2508.  
  2509.         if(moneys > 0)
  2510.         {
  2511.             format(ftext, sizeof(ftext), "Pula nagród w loterii została zwiększona do: %d$",
  2512.              g_server_info[E_lottery_money]);
  2513.  
  2514.             SendClientMessageToAll(COLOR_BLUE, ftext);
  2515.             return 1;
  2516.         }
  2517.  
  2518.         if(moneys < 0) {
  2519.             format(ftext, sizeof(ftext), "Pula nagród w loterii została zmniejszona do: %d$",
  2520.              g_server_info[E_lottery_money]);
  2521.  
  2522.             SendClientMessageToAll(COLOR_BLUE, ftext);
  2523.             return 1;
  2524.         }
  2525.  
  2526.         return 1;
  2527.     }
  2528.  
  2529.     ERRORMSG(playerid, "Brak uprawnień!");
  2530.     return 1;
  2531. }
  2532.  
  2533. dcmd_creategang(playerid, cmd[])
  2534. {
  2535.  
  2536.     new
  2537.         id,
  2538.         gtag[30],
  2539.         str[100],
  2540.         gcolor,
  2541.         zcolor;
  2542.  
  2543.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2544.     {
  2545.         if(sscanf(cmd, "uzhh", id, gtag, gcolor, zcolor))
  2546.             return ERRORMSG(playerid, "WPISZ: /creategang [leaderid] [tag] [gangcolor] [zonecolor]") & 1;
  2547.  
  2548.         if(!IsPlayerConnected(id))
  2549.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  2550.  
  2551.         if(gs_GangInfo[id][gangID])
  2552.             return ERRORMSG(playerid, "Ten gracz ma już gang.") & 1;
  2553.  
  2554.         gs_GangInfo[id][gangID] = gs_Gang[++g_gangid][gangID] = g_gangid;
  2555.         gs_Gang[g_gangid][color] = gcolor;
  2556.         gs_Gang[g_gangid][z_color] = zcolor;
  2557.         gs_GangInfo[id][isLeader] = 1;
  2558.  
  2559.         format(gs_Gang[g_gangid][tag], 15, "[%s]", gtag);
  2560.  
  2561.         format(query, sizeof(query), "INSERT INTO gangs VALUES ('%s', '%s', %d, 1);", PlayerName(id),
  2562.         gs_Gang[g_gangid][tag], g_gangid);
  2563.  
  2564.         dbquery(g_server_info[E_global_db], query);
  2565.  
  2566.         format(query, sizeof(query), "INSERT INTO gang_info VALUES (NULL, '%s', '%s' , 0, %d, %d, 0);",
  2567.          gs_Gang[g_gangid][tag], PlayerName(id), gcolor, zcolor);
  2568.  
  2569.         dbquery(g_server_info[E_global_db], query);
  2570.         format(str, sizeof(str), "Utwożyłeœ gang. TAG: %s Lider: %s", gtag, PlayerName(id));
  2571.         SendClientMessage(playerid, COLOR_GREEN, str);
  2572.  
  2573.         GivePlayerGang(id, g_gangid);
  2574.  
  2575.         return 1;
  2576.     }
  2577.     ERRORMSG(playerid, "Brak uprawnień");
  2578.     return 1;
  2579. }
  2580.  
  2581. dcmd_deletegang(playerid, cmd[])
  2582. {
  2583.     new
  2584.         gang_id,
  2585.         gtag[64],
  2586.         str[100];
  2587.  
  2588.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2589.     {
  2590.  
  2591.         if(sscanf(cmd, "d", gang_id))
  2592.             return ERRORMSG(playerid, "/deletegang [id gangu]") & 1;
  2593.            
  2594.            
  2595.         format(query, sizeof(query), "SELECT tag FROM gangs WHERE gangid = %d;", gang_id);
  2596.         new DBResult:result = db_query(g_server_info[E_global_db], query);
  2597.         db_get_field(result, 0, gtag, sizeof(gtag));
  2598.         db_free_result(result);
  2599.         if(!strlen(gtag))
  2600.             return ERRORMSG(playerid, "Dany gang nie istnieje") & 1;
  2601.         format(query, sizeof(query), "DELETE FROM gang_info WHERE gangid = %d;", gang_id);
  2602.         dbquery(g_server_info[E_global_db], query);
  2603.         format(query, sizeof(query), "DELETE FROM gangs WHERE gangid = %d;", gang_id);
  2604.         dbquery(g_server_info[E_global_db], query);
  2605.         format(query, sizeof(query), "UPDATE zone SET gang = 0,  color = -137 WHERE gangid = %d;", gang_id);
  2606.         dbquery(g_server_info[E_global_db], query);
  2607.         gs_Gang[gang_id][gmoney] = 0;
  2608.         gs_Gang[gang_id][zonesnumber] = 0;
  2609.  
  2610.         for(new i; i < MAX_ZONES; i++)
  2611.         {
  2612.             if(gs_ZonesInfo[i][gangID] == gang_id)
  2613.             {
  2614.                 gs_ZonesInfo[i][isFlashing] = 0;
  2615.                 gs_ZonesInfo[i][gangID] = 0;
  2616.                 gs_ZonesInfo[i][color] = -137;
  2617.                 gs_ZonesInfo[i][killed] = 0;
  2618.                 KillTimer(gs_ZonesInfo[i][ztimer]);
  2619.             }
  2620.             GangZoneHideForAll(i);
  2621.             GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
  2622.             if(gs_ZonesInfo[i][isFlashing])
  2623.                 GangZoneFlashForPlayer(playerid, i, 0xFF0000AA);
  2624.         }
  2625.  
  2626.         for(new id, gmax = GetMaxPlayers(); id < gmax; id++)
  2627.             if(gs_GangInfo[id][gangID] == gang_id)
  2628.                 DeletePlayerGang(id);
  2629.  
  2630.         format(str, sizeof(str), "Gang %s został usunięty", gtag);
  2631.         SendClientMessageToAll(COLOR_ORANGE, str);
  2632.         printf("%s usunal gang %s", PlayerName(playerid), gtag);
  2633.  
  2634.         return 1;
  2635.     }
  2636.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2637. }
  2638.  
  2639. dcmd_setleader(playerid, cmd[])
  2640. {
  2641.  
  2642.     new
  2643.         gid,
  2644.         id,
  2645.         str[100];
  2646.  
  2647.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2648.     {
  2649.         if(sscanf(cmd, "du", gid, id))
  2650.             return ERRORMSG(playerid, "WPISZ: /setleader [gang id] [id gracza]") & 1;
  2651.  
  2652.         if(!IsPlayerConnected(id))
  2653.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  2654.  
  2655.         format(query, sizeof(query), "UPDATE gangs SET isleader = 0 WHERE gangid = %d AND isleader = 1;", gid);
  2656.         dbquery(g_server_info[E_global_db], query);
  2657.  
  2658.         format(query, sizeof(query), "UPDATE gangs SET isleader = 1 WHERE member = '%s';", PlayerName(id));
  2659.         dbquery(g_server_info[E_global_db], query);
  2660.  
  2661.         format(query, sizeof(query), "UPDATE gang_info SET leader = '%s' WHERE gangid = %d;",
  2662.          PlayerName(id), gid);
  2663.          
  2664.         dbquery(g_server_info[E_global_db], query);
  2665.         for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
  2666.         {
  2667.             if(!IsPlayerConnected(i))
  2668.                 continue;
  2669.  
  2670.             if(gs_GangInfo[i][isLeader] == 1 && gs_GangInfo[i][gangID] == gid)
  2671.             {
  2672.                 SendClientMessage(i, COLOR_ORANGE, "Administrator usunšł Cię z pozycji lidera gangu");
  2673.                 break;
  2674.             }
  2675.         }
  2676.  
  2677.         gs_GangInfo[id][isLeader] = 1;
  2678.         format(str, sizeof(str), "Mianowałeœ %s nowym liderem gangu", PlayerName(id));
  2679.         SendClientMessage(playerid, COLOR_YELLOW, str);
  2680.         SendClientMessage(id, COLOR_GREEN, "Zostałeœ nowym liderem");
  2681.         printf("%s mianowal %s nowym liderem gangu", PlayerName(playerid), PlayerName(id));
  2682.  
  2683.     }
  2684.  
  2685.     return 1;
  2686. }
  2687.  
  2688.  
  2689. dcmd_givezone(playerid, cmd[])
  2690. {
  2691.     new id;
  2692.  
  2693.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2694.     {
  2695.  
  2696.         if(sscanf(cmd, "u", id))
  2697.             return ERRORMSG(playerid, "/givezone [playerid]") & 1;
  2698.  
  2699.         for(new i; i < MAX_ZONES; i++)
  2700.         {
  2701.             if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]) &&
  2702.              gs_ZonesInfo[i][gangID])
  2703.                 return ERRORMSG(playerid, "Ta dzielnica już do kogoœ należy") & 1;
  2704.  
  2705.             if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]))
  2706.             {
  2707.                 gs_ZonesInfo[i][gangID] = gs_GangInfo[id][gangID];
  2708.                 gs_Gang[gs_GangInfo[id][gangID]][zonesnumber]++;
  2709.                 SendMessageToGang(gs_ZonesInfo[i][gangID], COLOR_GREEN, "Twój gang przejšł nowš strefe");
  2710.                 gs_ZonesInfo[i][color] = gs_Gang[gs_GangInfo[id][gangID]][z_color];
  2711.                 GangZoneHideForAll(i);
  2712.                 GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
  2713.  
  2714.                 //printf("%d", gs_Gang[gs_GangInfo[id][gangID]][zonesnumber]);
  2715.                 return 1;
  2716.             }
  2717.         }
  2718.         return ERRORMSG(playerid, "Musisz stać w jakiejœ dzielnych") & 1;
  2719.     }
  2720.  
  2721.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2722. }
  2723.  
  2724. dcmd_removezone(playerid, cmd[])
  2725. {
  2726.     #pragma unused cmd
  2727.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  2728.     {
  2729.         for(new i; i < MAX_ZONES; i++)
  2730.         {
  2731.             if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]))
  2732.             {
  2733.                 gs_Gang[gs_ZonesInfo[i][gangID]][zonesnumber]--;
  2734.                 SendMessageToGang(gs_ZonesInfo[i][gangID], COLOR_YELLOW, "Twój gang stracił strefe");
  2735.                 gs_ZonesInfo[i][gangID] = 0;
  2736.                 gs_ZonesInfo[i][color] = 0xFFFFFF77;
  2737.                 GangZoneHideForAll(i);
  2738.  
  2739.                 GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
  2740.                 return 1;
  2741.             }
  2742.         }
  2743.         return ERRORMSG(playerid, "Musisz stać w jakiejœ dzielnych") & 1;
  2744.     }
  2745.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2746. }
  2747.  
  2748. dcmd_lastlogin(playerid, cmdtext[])
  2749. {
  2750.     new
  2751.         result[60],
  2752.         name[24];
  2753.  
  2754.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
  2755.     {
  2756.         if(sscanf(cmdtext, "z", name))
  2757.             return ERRORMSG(playerid, "WPISZ: /lastlogin [nick]") & 1;
  2758.  
  2759.         format(query, sizeof(query), "SELECT last_login FROM players WHERE name = '%s';", name);
  2760.         getfield(g_server_info[E_global_db], query, 0, result, sizeof(result));
  2761.         if(!strlen(result))
  2762.             return ERRORMSG(playerid, "Wybrany gracz jeszcze ani razu sie nie logował") & 1;
  2763.  
  2764.         format(ftext, sizeof(ftext), "%s ostatnio logował się %s", name, result);
  2765.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  2766.  
  2767.         return 1;
  2768.  
  2769.     }
  2770.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2771. }
  2772.  
  2773. dcmd_createhome(playerid, cmdtext[])
  2774. {
  2775.     new
  2776.         Float:pos[4],
  2777.         Float:pos2[4],
  2778.         DBResult:result,
  2779.         field[15],
  2780.         interior,
  2781.         i = 1,
  2782.         cost;
  2783.  
  2784.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2785.     {
  2786.         if(sscanf(cmdtext, "dd", interior, cost))
  2787.             return ERRORMSG(playerid, "WPISZ: /createhome [interior id] [cena]") & 1;
  2788.  
  2789.         if(interior == 0)
  2790.             return ERRORMSG(playerid, "błędny interior") & 1;
  2791.  
  2792.         if(cost <= 0)
  2793.             return ERRORMSG(playerid, "błędna cena") & 1;
  2794.  
  2795.         GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  2796.         GetPlayerFacingAngle(playerid, pos[3]);
  2797.  
  2798.         format(query, sizeof(query), "SELECT x, y, z, a, interior FROM interiors WHERE intid = %d",
  2799.          interior);
  2800.  
  2801.         result = db_query(g_server_info[E_global_db], query);
  2802.  
  2803.         for(new f; f < 4; f++)
  2804.         {
  2805.             db_get_field(result, f, field, sizeof(field));
  2806.             pos2[f] = floatstr(field);
  2807.         }
  2808.  
  2809.         db_get_field(result, 4, field, sizeof(field));
  2810.         interior = strval(field);
  2811.  
  2812.         db_free_result(result);
  2813.  
  2814.         while(g_house_info[i][E_enter_pos][0] && i < MAX_HOUSES)
  2815.             i++;
  2816.  
  2817.         format(query, sizeof(query), "INSERT INTO houses VALUES(NULL, 0, 'Na sprzedaż', \
  2818.          %f, %f, %f, %f, %f, %f, %f, %f, 0.0, 0.0, 0.0, 0.0, 0, 0, %d, %d, %d, 0, 0);",
  2819.          pos[0], pos[1], pos[2], pos[3], pos2[0], pos2[1], pos2[2], pos2[3], cost, interior, i);
  2820.  
  2821.         dbquery(g_server_info[E_global_db], query);
  2822.  
  2823.         g_house_info[i][E_pickup] = CreatePickup(1273, 23, pos[0], pos[1], pos[2]);
  2824.  
  2825.         g_house_info[i][E_owner] = Create3DTextLabel("Na sprzedaż", COLOR_GREEN,
  2826.          pos[0], pos[1] + 0.2, pos[2] + 0.5, 15, 0);
  2827.  
  2828.         g_house_info[i][E_enter_pos][0] = pos[0];
  2829.         g_house_info[i][E_enter_pos][1] = pos[1];
  2830.         g_house_info[i][E_enter_pos][2] = pos[2];
  2831.         g_house_info[i][E_enter_pos][3] = pos[3];
  2832.  
  2833.         g_house_info[i][E_exit_pos][0] = pos2[0];
  2834.         g_house_info[i][E_exit_pos][1] = pos2[1];
  2835.         g_house_info[i][E_exit_pos][2] = pos2[2];
  2836.         g_house_info[i][E_exit_pos][3] = pos2[3];
  2837.  
  2838.         g_house_info[i][E_cost] = cost;
  2839.         g_house_info[i][E_interior] = interior;
  2840.         g_house_info[i][E_vworld] = i;
  2841.  
  2842.         SendClientMessage(playerid, COLOR_YELLOW, "Utworzyłeœ nowy dom.");
  2843.         format(ftext, sizeof(ftext), "ID: %d Cena: %d$", i, cost);
  2844.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  2845.  
  2846.         return 1;
  2847.  
  2848.     }
  2849.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2850. }
  2851.  
  2852. dcmd_destroy(playerid, cmdtext[])
  2853. {
  2854.     #pragma unused cmdtext
  2855.     #define HOUSE_ENTER g_house_info[i][E_enter_pos]
  2856.     #define PROP_ENTER g_prop_info[i][E_enter_pos]
  2857.     new i = 1;
  2858.  
  2859.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2860.     {
  2861.         while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
  2862.         {
  2863.             if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
  2864.              HOUSE_ENTER[2]))
  2865.             {
  2866.                 HOUSE_ENTER[0] = 1;
  2867.                 HOUSE_ENTER[1] = 1;
  2868.                 HOUSE_ENTER[2] = 1;
  2869.                 Delete3DTextLabel(g_house_info[i][E_owner]);
  2870.                 DestroyPickup(g_house_info[i][E_pickup]);
  2871.                 DeleteHouse(i);
  2872.                 format(query, sizeof(query), "UPDATE houses SET enterx = 1, entery = 1, enterz = 1 WHERE hid = %d;",
  2873.                  i);
  2874.  
  2875.                 dbquery(g_server_info[E_global_db], query);
  2876.                 return 1;
  2877.             }
  2878.             i++;
  2879.         }
  2880.  
  2881.         i = 1;
  2882.  
  2883.         while(PROP_ENTER[0] && PROP_ENTER[1] && PROP_ENTER[2])
  2884.         {
  2885.             if(IsPlayerInRangeOfPoint(playerid, 3.0, PROP_ENTER[0], PROP_ENTER[1],
  2886.              PROP_ENTER[2]))
  2887.             {
  2888.                 PROP_ENTER[0] = 1;
  2889.                 PROP_ENTER[1] = 1;
  2890.                 PROP_ENTER[2] = 1;
  2891.                 Delete3DTextLabel(g_prop_info[i][E_owner]);
  2892.                 DestroyPickup(g_prop_info[i][E_pickup]);
  2893.                 DeletePropertie(i);
  2894.  
  2895.                 format(query, sizeof(query), "UPDATE properties SET enterx = 1, entery = 1, enterz = 1 WHERE pid = %d;",
  2896.                  i);
  2897.  
  2898.                 dbquery(g_server_info[E_global_db], query);
  2899.  
  2900.                 return 1;
  2901.             }
  2902.             i++;
  2903.         }
  2904.  
  2905.         ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoœci aby jš kupić!");
  2906.  
  2907.         return 1;
  2908.     }
  2909.  
  2910.     ERRORMSG(playerid, "Brak uprawnień!");
  2911.     return 1;
  2912.  
  2913.     #undef HOUSE_ENTER
  2914.     #undef PROP_ENTER
  2915. }
  2916.  
  2917. dcmd_sethomecarspawn(playerid, cmdtext[])
  2918. {
  2919.     new
  2920.         Float:pos[4],
  2921.         hid;
  2922.  
  2923.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2924.     {
  2925.         if(sscanf(cmdtext, "d", hid))
  2926.             return ERRORMSG(playerid, "WPISZ: /sethomecarspawn [home id]") & 1;
  2927.  
  2928.         if(g_house_info[hid][E_enter_pos][0] == 0)
  2929.             return ERRORMSG(playerid, "błędne id domu") & 1;
  2930.  
  2931.         GetVehiclePos(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
  2932.         GetVehicleZAngle(GetPlayerVehicleID(playerid), pos[3]);
  2933.  
  2934.         format(query, sizeof(query), "UPDATE houses SET carx = %f, cary = %f, carz = %f, \
  2935.          cara = %f WHERE hid = %d", pos[0], pos[1], pos[2], pos[3], hid);
  2936.  
  2937.         dbquery(g_server_info[E_global_db], query);
  2938.  
  2939.         format(ftext, sizeof(ftext), "Zmieniłeœ spawn pojazdu pod domem o ID: %d", hid);
  2940.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  2941.         return 1;
  2942.     }
  2943.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2944. }
  2945.  
  2946. dcmd_createinterior(playerid, cmdtext[])
  2947. {
  2948.     new
  2949.         Float:pos[4],
  2950.         comm[60],
  2951.         iid;
  2952.  
  2953.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2954.     {
  2955.         if(sscanf(cmdtext, "dffffs", iid, pos[0], pos[1], pos[2], pos[3], comm))
  2956.             return ERRORMSG(playerid, "WPISZ: /createinterior [interior] [X] [Y] [Z] [Angle] [komenatarz]") & 1;
  2957.  
  2958.         format(query, sizeof(query), "INSERT INTO interiors VALUES(NULL, %d, %f, %f, %f, %f, '%s');",
  2959.          iid, pos[0], pos[1], pos[2], pos[3], comm);
  2960.  
  2961.         dbquery(g_server_info[E_global_db], query);
  2962.  
  2963.         format(ftext, sizeof(ftext), "Dodałeœ interioro ID: %d (%f, %f, %f, %f)",
  2964.          iid, pos[0], pos[1], pos[2], pos[3]);
  2965.  
  2966.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  2967.         return 1;
  2968.     }
  2969.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  2970. }
  2971.  
  2972.  
  2973. dcmd_createprop(playerid, cmdtext[])
  2974. {
  2975.     new
  2976.         Float:pos[4],
  2977.         Float:pos2[4],
  2978.         DBResult:result,
  2979.         field[15],
  2980.         interior,
  2981.         i = 1,
  2982.         cost,
  2983.         type,
  2984.         payment,
  2985.         ecost;
  2986.  
  2987.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  2988.     {
  2989.         if(sscanf(cmdtext, "ddddd", type, interior, cost, payment, ecost))
  2990.             return ERRORMSG(playerid, "WPISZ: /createprop [typ] [interior id] [cena] [zysk] [zysk z wejscia]") & 1;
  2991.  
  2992.         if(interior == 0)
  2993.             return ERRORMSG(playerid, "błędny interior") & 1;
  2994.  
  2995.         if(cost <= 0)
  2996.             return ERRORMSG(playerid, "błędna cena") & 1;
  2997.  
  2998.         if(ecost <= 0)
  2999.             return ERRORMSG(playerid, "błędny zysk z wejœcia") & 1;
  3000.  
  3001.         GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  3002.         GetPlayerFacingAngle(playerid, pos[3]);
  3003.  
  3004.         format(query, sizeof(query), "SELECT x, y, z, a, interior FROM interiors WHERE intid = %d",
  3005.          interior);
  3006.  
  3007.         result = db_query(g_server_info[E_global_db], query);
  3008.  
  3009.         for(new f; f < 4; f++)
  3010.         {
  3011.             db_get_field(result, f, field, sizeof(field));
  3012.             pos2[f] = floatstr(field);
  3013.         }
  3014.  
  3015.         db_get_field(result, 4, field, sizeof(field));
  3016.         interior = strval(field);
  3017.  
  3018.         db_free_result(result);
  3019.  
  3020.         while(g_prop_info[i][E_enter_pos][0] && i < MAX_PROPERTIES)
  3021.             i++;
  3022.  
  3023.         format(query, sizeof(query), "INSERT INTO properties VALUES(NULL, 0, 'Na sprzedaż', %f, %f, %f, %f, %f, %f, %f, %f, %d, %d, %d, %d, %d, %d);",pos[0], pos[1], pos[2], pos[3], pos2[0], pos2[1], pos2[2], pos2[3], cost, interior, i, payment, type, ecost);
  3024.         dbquery(g_server_info[E_global_db], query);
  3025.  
  3026.         g_prop_info[i][E_pickup] = CreatePickup(1272, 23, pos[0], pos[1], pos[2]);
  3027.  
  3028.         g_prop_info[i][E_owner] = Create3DTextLabel("Na sprzedaż", COLOR_BLUE,
  3029.          pos[0], pos[1] + 0.2, pos[2] + 0.5, 15, 0);
  3030.  
  3031.         g_prop_info[i][E_enter_pos][0] = pos[0];
  3032.         g_prop_info[i][E_enter_pos][1] = pos[1];
  3033.         g_prop_info[i][E_enter_pos][2] = pos[2];
  3034.         g_prop_info[i][E_enter_pos][3] = pos[3];
  3035.  
  3036.         g_prop_info[i][E_exit_pos][0] = pos2[0];
  3037.         g_prop_info[i][E_exit_pos][1] = pos2[1];
  3038.         g_prop_info[i][E_exit_pos][2] = pos2[2];
  3039.         g_prop_info[i][E_exit_pos][3] = pos2[3];
  3040.  
  3041.         g_prop_info[i][E_cost] = cost;
  3042.         g_prop_info[i][E_payment] = payment;
  3043.         g_prop_info[i][E_type] = type;
  3044.         g_prop_info[i][E_e_payment] = ecost;
  3045.         g_prop_info[i][E_interior] = interior;
  3046.         g_prop_info[i][E_vworld] = i;
  3047.  
  3048.         SendClientMessage(playerid, COLOR_YELLOW, "Utworzyłeœ nowy biznes.");
  3049.         format(ftext, sizeof(ftext), "ID: %d Cena: %d$ Przydód: %d$", i, cost, payment);
  3050.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  3051.  
  3052.         return 1;
  3053.     }
  3054.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  3055. }
  3056.  
  3057. dcmd_interiorslist(playerid, cmd[])
  3058. {
  3059.     #pragma unused cmd
  3060.     new
  3061.         str[60],
  3062.         result_str[25],
  3063.         result_str2[25],
  3064.         DBResult:result;
  3065.  
  3066.     result = db_query(g_server_info[E_global_db], "SELECT intid, comm FROM interiors");
  3067.     SendClientMessage(playerid, COLOR_GREEN, "Lista interiorów:");
  3068.  
  3069.     if(!db_num_rows(result))
  3070.         return SendClientMessage(playerid, COLOR_YELLOW, "Brak") & 1;
  3071.     do
  3072.     {
  3073.         db_get_field(result, 0, result_str, sizeof(result_str));
  3074.         db_get_field(result, 1, result_str2, sizeof(result_str2));
  3075.         format(str, sizeof(str), "ID: %d Opis: %s", strval(result_str), result_str2);
  3076.         SendClientMessage(playerid, COLOR_YELLOW, str);
  3077.     }
  3078.  
  3079.     while(db_next_row(result));
  3080.  
  3081.     db_free_result(result);
  3082.  
  3083.     return 1;
  3084. }
  3085.  
  3086. dcmd_getid(playerid, cmdtext[])
  3087. {
  3088.     #pragma unused cmdtext
  3089.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  3090.     {
  3091.         new id = GetHouseID(playerid);
  3092.         if(id > 0)
  3093.             format(ftext, sizeof(ftext), "ID domku to %d", id);
  3094.         else
  3095.         {
  3096.             id = GetPropertieID(playerid);
  3097.             if(id > 0)
  3098.                 format(ftext, sizeof(ftext), "ID posiadłoœci to %d", id);
  3099.  
  3100.             else
  3101.                 return ERRORMSG(playerid, "Nie jesteœ w pobliżu domku/posiadłoœci!") & 1;
  3102.         }
  3103.         SendClientMessage(playerid, COLOR_YELLOW, ftext);
  3104.  
  3105.         return 1;
  3106.     }
  3107.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  3108. }
  3109.  
  3110. dcmd_desynch(playerid, cmdtext[])
  3111. {
  3112.     new id;
  3113.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3114.     {
  3115.         if(sscanf(cmdtext, "u", id))
  3116.             return ERRORMSG(playerid, "WPISZ: /desynch [id]") & 1;
  3117.  
  3118.         if(!IsPlayerConnected(id))
  3119.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  3120.  
  3121.         format(ftext, sizeof(ftext), "Zdesynchronizowałeœ gracza %s", PlayerName(id));
  3122.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3123.         g_player_info[id][E_desynch] = true;
  3124.  
  3125.         return 1;
  3126.     }
  3127.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  3128. }
  3129.  
  3130. dcmd_undesynch(playerid, cmdtext[])
  3131. {
  3132.     new id;
  3133.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3134.     {
  3135.         if(sscanf(cmdtext, "u", id))
  3136.             return ERRORMSG(playerid, "WPISZ: /undesynch [id]") & 1;
  3137.  
  3138.         if(!IsPlayerConnected(id))
  3139.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  3140.  
  3141.         format(ftext, sizeof(ftext), "Przywróciłeœ synchronizacje gracza %s", PlayerName(id));
  3142.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3143.         g_player_info[id][E_desynch] = false;
  3144.  
  3145.         return 1;
  3146.     }
  3147.     return ERRORMSG(playerid, "Brak uprawnień.") & 1;
  3148. }
  3149.  
  3150. dcmd_addad(playerid, cmdtext[])
  3151. {
  3152.     new
  3153.         description[32],
  3154.         content[128];
  3155.  
  3156.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  3157.     {
  3158.         if(sscanf(cmdtext, "ss", description, content))
  3159.             return ERRORMSG(playerid, "WPISZ: /addad [opis] [tekst]") & 1;
  3160.  
  3161.         if(!CheckWrangSings(description) || !CheckWrangSings(content))
  3162.         {
  3163.             return ERRORMSG(playerid, "Znaki ' oraz \" sš niedozwolone.") & 1;
  3164.         }
  3165.  
  3166.         format(query, sizeof(query), "INSERT INTO ads (description, content) \
  3167.            VALUES ('%s', '%s')",
  3168.             description, content
  3169.         );
  3170.  
  3171.         dbquery(g_server_info[E_global_db], query);
  3172.  
  3173.         SendClientMessage(playerid, COLOR_GREEN, "Dodałeœ ogłoszenie.");
  3174.         return 1;
  3175.     }
  3176.  
  3177.     ERRORMSG(playerid, "Brak uprawnień!");
  3178.     return 1;
  3179. }
  3180.  
  3181. dcmd_adlist(playerid, cmdtext[])
  3182. {
  3183.     #pragma unused cmdtext
  3184.     new
  3185.         DBResult:result,
  3186.         id,
  3187.         field[32];
  3188.  
  3189.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  3190.     {
  3191.         result = db_query(g_server_info[E_global_db], "SELECT id, description \
  3192.            FROM ads");
  3193.  
  3194.         if(!db_num_rows(result))
  3195.         {
  3196.             SendClientMessage(playerid, COLOR_GREEN, "Brak ogłoszeń.");
  3197.             db_free_result(result);
  3198.             return 1;
  3199.         }
  3200.  
  3201.         SendClientMessage(playerid, COLOR_GREEN, "Lista ogłoszeń:");
  3202.  
  3203.         do
  3204.         {
  3205.             db_get_field(result, 0, field, sizeof(field));
  3206.             id = strval(field);
  3207.  
  3208.             db_get_field(result, 1, field, sizeof(field));
  3209.  
  3210.             format(ftext, sizeof(ftext), "%d. %s", id, field);
  3211.             SendClientMessage(playerid, COLOR_YELLOW, ftext);
  3212.         }
  3213.         while(db_next_row(result));
  3214.  
  3215.         db_free_result(result);
  3216.         return 1;
  3217.     }
  3218.  
  3219.     ERRORMSG(playerid, "Brak uprawnień!");
  3220.     return 1;
  3221. }
  3222.  
  3223. dcmd_delad(playerid, cmdtext[])
  3224. {
  3225.     new
  3226.         id;
  3227.  
  3228.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  3229.     {
  3230.         if(sscanf(cmdtext, "d", id))
  3231.             return ERRORMSG(playerid, "WPISZ: /delad [ID ogłoszenia]") & 1;
  3232.  
  3233.         format(query, sizeof(query), "DELETE FROM ads WHERE id = %d", id);
  3234.         dbquery(g_server_info[E_global_db], query);
  3235.  
  3236.         SendClientMessage(playerid, COLOR_GREEN, "Ogłoszenie usunięte.");
  3237.         return 1;
  3238.     }
  3239.    
  3240.     ERRORMSG(playerid, "Brak uprawnień!");
  3241.     return 1;
  3242. }
  3243.  
  3244. dcmd_adrotate(playerid, cmdtext[])
  3245. {
  3246.     #pragma unused cmdtext
  3247.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
  3248.     {
  3249.         UpdateAd();
  3250.         SendClientMessage(playerid, COLOR_GREEN, "Ogłoszenie zmienione.");
  3251.         return 1;
  3252.     }
  3253.  
  3254.     ERRORMSG(playerid, "Brak uprawnień!");
  3255.     return 1;
  3256. }
  3257.  
  3258. dcmd_eject(playerid, cmdtext[])
  3259. {
  3260.     new id;
  3261.  
  3262.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3263.     {
  3264.         if(sscanf(cmdtext, "u", id))
  3265.             return ERRORMSG(playerid, "WPISZ: /eject [ID gracza]") & 1;
  3266.  
  3267.         if(!IsPlayerConnected(id))
  3268.             return ERRORMSG(playerid, "Błędne id gracza!") & 1;
  3269.  
  3270.         RemovePlayerFromVehicle(id);
  3271.  
  3272.         format(ftext, sizeof(ftext), "%s został wyrzucony z pojazdu przez %sa %s", PlayerName(id),
  3273.             AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
  3274.         SendClientMessageToAll(COLOR_BLUE, ftext);
  3275.  
  3276.         return 1;
  3277.     }
  3278.  
  3279.     ERRORMSG(playerid, "Brak uprawnień!");
  3280.     return 1;
  3281. }
  3282.  
  3283. dcmd_setskin(playerid, cmdtext[])
  3284. {
  3285.     new id, skin;
  3286.  
  3287.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3288.     {
  3289.         if(sscanf(cmdtext, "ud", id, skin))
  3290.             return ERRORMSG(playerid, "WPISZ /setskin [id gracza] [id skinu]") & 1;
  3291.  
  3292.         if(!IsPlayerConnected(id))
  3293.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  3294.  
  3295.         if(!IsValidSkin(skin))
  3296.             return ERRORMSG(playerid, "Niepoprawny skin") & 1;
  3297.  
  3298.         g_player_info[playerid][E_skin] = skin;
  3299.         SetPlayerSkin(playerid, skin);
  3300.  
  3301.         format(ftext, sizeof(ftext), "Zmieniłeœ skin graczowi %s (ID: %d) na %d",
  3302.             PlayerName(id), id, skin);
  3303.            
  3304.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3305.  
  3306.         format(ftext, sizeof(ftext), "%s zmienił Twój skin na %d.",
  3307.             PlayerName(playerid), skin);
  3308.         SendClientMessage(id, COLOR_GREEN, ftext);
  3309.         return 1;
  3310.     }
  3311.  
  3312.     ERRORMSG(playerid, "Brak uprawnień!");
  3313.     return 1;
  3314. }
  3315.  
  3316. dcmd_sl(playerid, cmdtext[])
  3317.     return dcmd_setloc(playerid, cmdtext);
  3318.  
  3319. dcmd_setloc(playerid, cmdtext[])
  3320. {
  3321.     new Float:locX, Float:locY, Float:locZ, /*locInt,*/ loc;
  3322.  
  3323.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3324.     {
  3325.         if(sscanf(cmdtext, "d", loc))
  3326.         {
  3327.             GetPlayerPos(playerid, locX, locY, locZ);
  3328.             //locInt = GetPlayerInterior(playerid);
  3329.  
  3330.             SendClientMessage(playerid, COLOR_GREEN, "Zapisałeœ tymczasowš lokację");
  3331.             return 1;
  3332.         }
  3333.  
  3334.         if(loc < 1 || loc > 5)
  3335.             return ERRORMSG(playerid, "Błędne id lokacji (1-5)") & 1;
  3336.  
  3337.         new int, Float:x, Float:y, Float:z;
  3338.  
  3339.         GetPlayerPos(playerid, x, y, z);
  3340.         int = GetPlayerInterior(playerid);
  3341.  
  3342.         format(query, sizeof(query), "INSERT OR REPLACE INTO locations \
  3343.            (id, x, y, z, interior) VALUES (%d, %f, %f, %f, %d)",
  3344.             loc, x, y, z, int);
  3345.         dbquery(g_server_info[E_global_db], query);
  3346.  
  3347.         format(ftext, sizeof(ftext), "Zapisałeœ lokację o id %d", loc);
  3348.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3349.        
  3350.         return 1;
  3351.     }
  3352.  
  3353.     ERRORMSG(playerid, "Brak uprawnień!");
  3354.     return 1;
  3355. }
  3356.  
  3357. dcmd_tpl(playerid, cmdtext[])
  3358.     return dcmd_teleportloc(playerid, cmdtext);
  3359.  
  3360. dcmd_teleportloc(playerid, cmdtext[])
  3361. {
  3362.     new Float:locX, Float:locY, Float:locZ, locInt, loc;
  3363.     new DBResult:result;
  3364.     new field[15];
  3365.  
  3366.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3367.     {
  3368.         if(sscanf(cmdtext, "d", loc))
  3369.         {
  3370.             SetPlayerPos(playerid, locX, locY, locZ);
  3371.             SetPlayerInterior(playerid, locInt);
  3372.  
  3373.             SendClientMessage(playerid, COLOR_GREEN, "Teleportowałeœ się do tymczasowej lokacji");
  3374.             return 1;
  3375.         }
  3376.  
  3377.         if(loc < 1 || loc > 5)
  3378.             return ERRORMSG(playerid, "Błędne id lokacji (1-5)") & 1;
  3379.  
  3380.         new int, Float:x, Float:y, Float:z;
  3381.  
  3382.         format(query, sizeof(query), "SELECT x, y, z, int FROM locations WHERE id = %d", loc);
  3383.         result = db_query(g_server_info[E_global_db], query);
  3384.  
  3385.         db_get_field(result, 0, field, sizeof(field));
  3386.         x = floatstr(field);
  3387.  
  3388.         db_get_field(result, 1, field, sizeof(field));
  3389.         y = floatstr(field);
  3390.  
  3391.         db_get_field(result, 2, field, sizeof(field));
  3392.         z = floatstr(field);
  3393.  
  3394.         db_get_field(result, 3, field, sizeof(field));
  3395.         int = strval(field);
  3396.  
  3397.         SetPlayerPos(playerid, x, y, z);
  3398.         SetPlayerInterior(playerid, int);
  3399.  
  3400.         format(ftext, sizeof(ftext), "Teleportowałeœ się do lokacji o id %d", loc);
  3401.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3402.         return 1;
  3403.     }
  3404.  
  3405.     ERRORMSG(playerid, "Brak uprawnień!");
  3406.     return 1;
  3407. }
  3408.  
  3409. dcmd_setvip(playerid, cmdtext[])
  3410. {
  3411.     new id, status;
  3412.     static const status_text[2][] = { "zabrał", "nadał" };
  3413.  
  3414.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3415.     {
  3416.         if(sscanf(cmdtext, "ud", id, status) || (status != 0 && status != 1))
  3417.             return ERRORMSG(playerid, "WPISZ /setvip [id gracza] 0/1") & 1;
  3418.  
  3419.         if(!IsPlayerConnected(id))
  3420.             return ERRORMSG(playerid, "Błędne id gracza") & 1;
  3421.  
  3422.         g_player_info[id][E_vip] = bool:status;
  3423.  
  3424.         format(ftext, sizeof(ftext), "%seœ uprawnienia VIPa graczowi %s (ID: %d)",
  3425.             status_text[status], PlayerName(id), id);
  3426.         SendClientMessage(playerid, COLOR_GREEN, ftext);
  3427.  
  3428.         format(ftext, sizeof(ftext), "%s %s Ci uprawnienia VIPa",
  3429.             PlayerName(playerid), status_text[status]);
  3430.         SendClientMessage(id, COLOR_GREEN, ftext);
  3431.         return 1;
  3432.     }
  3433.  
  3434.     ERRORMSG(playerid, "Brak uprawnień!");
  3435.     return 1;
  3436. }
  3437.  
  3438. dcmd_setmaxping(playerid, cmdtext[])
  3439. {
  3440.     new max_ping;
  3441.     if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
  3442.     {
  3443.         if(sscanf(cmdtext, "d", max_ping))
  3444.             return ERRORMSG(playerid, "WPISZ /setmaxping [ping]") & 1;
  3445.            
  3446.         format(query, sizeof(query), "UPDATE config SET value = '%d' WHERE \
  3447.             name = 'maxping';", max_ping);
  3448.            
  3449.         dbquery(g_server_info[E_global_db], query);
  3450.        
  3451.         format(ftext, sizeof(ftext), "Maksymalny ping został zmieniony przez \
  3452.             %sa %s na %d", AdminLevelName(g_player_info[playerid][E_admin_lvl]),
  3453.             PlayerName(playerid), max_ping);
  3454.            
  3455.         SendClientMessageToAll(COLOR_BLUE, ftext);
  3456.        
  3457.         g_server_info[E_max_ping] = max_ping;
  3458.        
  3459.         return 1;
  3460.     }
  3461.    
  3462.     ERRORMSG(playerid, "Brak uprawnień!");
  3463.     return 1;
  3464. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement