Advertisement
Guest User

Untitled

a guest
Jun 10th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 84.18 KB | None | 0 0
  1. /*
  2. Copyright (C) 2019 Zielakless
  3.  
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17.  
  18.   //--------------------------------------------------------------------------//
  19.  //                                 COLOR                                    //
  20. //--------------------------------------------------------------------------//
  21. //Gray - #C2C2C2
  22. //Red - #FF0000
  23. //Raspberry - #C5345B
  24. //Orange - #FF9900
  25. //Light Orange - #F7A26F
  26. //Yellow - #FFFF00
  27. //Light Yellow - #FFFFAA
  28. //Dirty Yellow - #B2B285
  29. //Green - #66CC33
  30. //Light Green - #91E567
  31. //Emerald - #00EEAD
  32. //Turquoise - #67D1B0
  33. //Blue - #63AFF0
  34. //Light Blue - #01FCFF
  35. //Purple - #9955DE
  36. //Dirty Purple - #A6A3C5
  37. //Brown - #B87333
  38.  
  39.   //--------------------------------------------------------------------------//
  40.  //                                 INCLUDE                                  //
  41. //--------------------------------------------------------------------------//
  42. #include                        a_samp
  43. #include                        foreach
  44. #include                        md5
  45. #include                        mysql
  46. #include                        pawncmd
  47. #include                        sky
  48. #include                        sscanf
  49. #include                        streamer
  50. #include                        weapon-config
  51.  
  52.   //--------------------------------------------------------------------------//
  53.  //                                 DEFINE                                   //
  54. //--------------------------------------------------------------------------//
  55. #undef MAX_PLAYERS
  56. #define MAX_PLAYERS             20
  57.  
  58. #define AUTHOR                  "Zielakless"
  59. #define VERSION                 "1.0"
  60. #define UPDATE                  "10.06.2019"
  61. #define MYSQL_HOSTNAME          "127.0.0.1"
  62. #define MYSQL_USERNAME          "server_113"
  63. #define MYSQL_PASSWORD          "szkoda"
  64. #define MYSQL_DATABASE          "server_113_Zielakless"
  65.  
  66.   //--------------------------------------------------------------------------//
  67.  //                                 DIALOG                                   //
  68. //--------------------------------------------------------------------------//
  69. #define DIALOG_NOTHING          0
  70. #define DIALOG_REGISTER         1
  71. #define DIALOG_LOGIN            2
  72. #define DIALOG_ADMIN_PASSWORD   3
  73. #define DIALOG_ADMIN_LOGIN      4
  74.  
  75.   //--------------------------------------------------------------------------//
  76.  //                                 ENUM                                     //
  77. //--------------------------------------------------------------------------//
  78. enum Player_Infos {
  79.     bool:Player_Logged,
  80.     bool:Player_Is_Admin,
  81.     bool:Player_Away,
  82.  
  83.     Player_Unique_ID,
  84.     Player_Username[MAX_PLAYER_NAME],
  85.     Player_Score,
  86.     Player_Money,
  87.     Player_Admin,
  88.     Player_Kills,
  89.     Player_Deaths,
  90.     Player_Killstreak,
  91.     Player_Skin,
  92.     Player_Priv_Car,
  93.     Player_On_Arena,
  94.     Player_Bags,
  95.     Player_Online_Time,
  96.     Player_IP[64],
  97.     Player_GPCI[64],
  98.    
  99.     Text3D:Player_Label
  100. };
  101.  
  102. enum Command_Infos {
  103.     Command_Naj,
  104.     Command_Zw
  105. };
  106.  
  107. enum Priv_Car_Infos {
  108.     Priv_Car_Model,
  109.     Priv_Car_Main_Color,
  110.     Priv_Car_Primary_Color,
  111.     Priv_Car_Paintjob,
  112.     Priv_Car_Fuel_Type,
  113.  
  114.     Float:Priv_Car_Fuel,
  115.     Float:Priv_Car_Mileage,
  116.     Float:Priv_Car_Parking_X,
  117.     Float:Priv_Car_Parking_Y,
  118.     Float:Priv_Car_Parking_Z,
  119.     Float:Priv_Car_Parking_A,
  120.    
  121.     Text3D:Priv_Car_Label
  122. };
  123.  
  124. enum Bag_Infos
  125. {
  126.     bool:Bag_Placed,
  127.  
  128.     Float:Bag_PosX,
  129.     Float:Bag_PosY,
  130.     Float:Bag_PosZ,
  131.     Bag_Pickup,
  132.     Bag_Score,
  133.     Bag_Money
  134. };
  135.  
  136.   //--------------------------------------------------------------------------//
  137.  //                                 VARIABLE                                 //
  138. //--------------------------------------------------------------------------//
  139. new PlayerText:TextDraw_LicznikInformacje[MAX_PLAYERS][5];
  140. new PlayerText:TextDraw_Nick[MAX_PLAYERS];
  141. new PlayerText:TextDraw_Statystyki[MAX_PLAYERS];
  142.  
  143. new Text:TextDraw_Godzina;
  144. new Text:TextDraw_Data;
  145. new Text:TextDraw_Zabawy[2];
  146. new Text:TextDraw_Walizka[4];
  147. new Text:TextDraw_LicznikBox[2];
  148. new Text:TextDraw_StatystykiBox[2];
  149. new Text:TextDraw_Gracze;
  150. new Text:TextDraw_Areny;
  151. new Text:TextDraw_Nazwa;
  152. new Text:TextDraw_Strona;
  153.  
  154. new Player_Info[MAX_PLAYERS][Player_Infos];
  155. new Command_Info[MAX_PLAYERS][Command_Infos];
  156. new Priv_Car_Info[MAX_PLAYERS][Priv_Car_Infos];
  157. new Bag_Info[Bag_Infos];
  158.  
  159. new bool:Vehicle_Is_Server[MAX_VEHICLES];
  160. new bool:Vehicle_Is_Public[MAX_VEHICLES];
  161. new bool:Vehicle_Is_Private[MAX_VEHICLES];
  162.  
  163. new Float:FreeroamSpawnList[][] = {
  164.     {2256.7126, -37.3747, 26.4844},
  165.     {2718.2590, -2397.6870, 13.6328},
  166.     {2778.6646, -2003.0597, 13.5547},
  167.     {2726.2253, 735.2389, 10.8984},
  168.     {-2532.0742, -609.8701, 132.5625},
  169.     {1717.4056, -2681.3687, 13.5469},
  170.     {1673.4735, -1323.7244, 17.4306},
  171.     {2080.9983, 1588.7236, 10.8203},
  172.     {-1833.5326, 574.6578, 234.8874},
  173.     {2059.8332, 163.6176, 470.4751},
  174.     {2584.9539, -2199.3391, -0.2188},
  175.     {811.0493, -1905.3453, 2343.6125},
  176.     {2339.4807, -3256.7822, 12.9609},
  177.     {1943.9916, -3.9042, 137.2063}
  178. };
  179. new ColorList[] = {
  180.     0xFF8C13FF,
  181.     0xC715FFFF,
  182.     0x20B2AAFF,
  183.     0xDC143CFF,
  184.     0x6495EDFF,
  185.     0xf0e68cFF,
  186.     0x778899FF,
  187.     0xFF1493FF,
  188.     0xF4A460FF,
  189.     0xEE82EEFF,
  190.     0xFFD720FF,
  191.     0x8b4513FF,
  192.     0x4949A0FF,
  193.     0x148b8bFF,
  194.     0x14ff7fFF,
  195.     0x556b2fFF,
  196.     0x6FD9FAFF,
  197.     0x10DC29FF,
  198.     0x534081FF,
  199.     0x5495CDFF,
  200.     0xEF6CE8FF,
  201.     0xBD34DAFF,
  202.     0x247C1BFF,
  203.     0x4C8E5DFF,
  204.     0x635B03FF,
  205.     0xCB7ED3FF,
  206.     0x65ADEBFF,
  207.     0x5C1ACCFF,
  208.     0xF2F853FF,
  209.     0x11F891FF,
  210.     0x7B39AAFF,
  211.     0x53EB10FF,
  212.     0x54137DFF,
  213.     0x275222FF,
  214.     0xF09F5BFF,
  215.     0x3D0A4FFF,
  216.     0x22F767FF,
  217.     0xD63034FF,
  218.     0x9A6980FF,
  219.     0xDFB935FF,
  220.     0x3793FAFF,
  221.     0x90239DFF,
  222.     0xE9AB2FFF,
  223.     0xAF2FF3FF,
  224.     0x757F94FF,
  225.     0xB98519FF,
  226.     0x388EEAFF,
  227.     0x928151FF,
  228.     0xA55043FF,
  229.     0x3DE018FF,
  230.     0x93AB1CFF,
  231.     0x95BAF0FF,
  232.     0x369976FF,
  233.     0x18F71FFF,
  234.     0x4B8987FF,
  235.     0x491B9EFF,
  236.     0x829DC7FF,
  237.     0xBCE635FF,
  238.     0xCEA6DFFF,
  239.     0x20D4ADFF,
  240.     0x2D74FDFF,
  241.     0x3C1C0DFF,
  242.     0x12D6D4FF,
  243.     0x48C000FF,
  244.     0x2A51E2FF,
  245.     0xE3AC12FF,
  246.     0xFC42A8FF,
  247.     0x2FC827FF,
  248.     0x1A30BFFF,
  249.     0xB740C2FF,
  250.     0x42ACF5FF,
  251.     0x2FD9DEFF,
  252.     0xFAFB71FF,
  253.     0x55D1CDFF,
  254.     0xC471BDFF,
  255.     0x94436EFF,
  256.     0xC1F7ECFF,
  257.     0xCE79EEFF,
  258.     0xBD1EF2FF,
  259.     0x93B7E4FF,
  260.     0x3214AAFF,
  261.     0x184D3BFF,
  262.     0xAE4B99FF,
  263.     0x7E49D7FF,
  264.     0x4C436EFF,
  265.     0xFA24CCFF,
  266.     0xCE76BEFF,
  267.     0xA04E0AFF,
  268.     0x9F945CFF,
  269.     0xDCDE3DFF,
  270.     0x10C9C5FF,
  271.     0x70524DFF,
  272.     0x8BE472FF,
  273.     0x8A2CD7FF,
  274.     0x6152C2FF,
  275.     0xCF72A9FF,
  276.     0xE59338FF,
  277.     0xEEDC2DFF,
  278.     0xD8C762FF,
  279.     0xD8C762FF,
  280.     0xFF8C13FF,
  281.     0xC715FFFF,
  282.     0x20B2AAFF,
  283.     0xDC143CFF,
  284.     0x6495EDFF,
  285.     0xf0e68cFF,
  286.     0x778899FF,
  287.     0xFF1493FF,
  288.     0xF4A460FF,
  289.     0xEE82EEFF,
  290.     0xFFD720FF,
  291.     0x8b4513FF,
  292.     0x4949A0FF,
  293.     0x148b8bFF,
  294.     0x14ff7fFF,
  295.     0x556b2fFF,
  296.     0xBFD9FAFF,
  297.     0x10DC29FF,
  298.     0x534081FF,
  299.     0xE495CDFF,
  300.     0xEF6CE8FF,
  301.     0xBD34DAFF,
  302.     0x247C1BFF,
  303.     0xAC8E5DFF,
  304.     0x635B03FF,
  305.     0xCB7ED3FF,
  306.     0x65ADEBFF,
  307.     0x5C1ACCFF,
  308.     0xF2F853FF,
  309.     0x11F891FF,
  310.     0x7B39AAFF,
  311.     0x53EB10FF,
  312.     0x54137DFF,
  313.     0x275222FF,
  314.     0xF09F5BFF,
  315.     0x3D0A4FFF,
  316.     0x22F767FF,
  317.     0xD63034FF,
  318.     0x9A6980FF,
  319.     0xDFB935FF,
  320.     0x3793FAFF,
  321.     0x90239DFF,
  322.     0xE9AB2FFF,
  323.     0xAF2FF3FF,
  324.     0xF57F94FF,
  325.     0xB98519FF,
  326.     0x388EEAFF,
  327.     0xE28151FF,
  328.     0xA55043FF,
  329.     0xFDE018FF,
  330.     0x93AB1CFF,
  331.     0x95BAF0FF,
  332.     0x369976FF,
  333.     0x18F71FFF,
  334.     0x4B8987FF,
  335.     0x491B9EFF,
  336.     0x829DC7FF,
  337.     0xBCE635FF,
  338.     0xCEA6DFFF,
  339.     0x20D4ADFF,
  340.     0x2D74FDFF,
  341.     0x3C1C0DFF,
  342.     0x12D6D4FF,
  343.     0x48C000FF,
  344.     0x2A51E2FF,
  345.     0xE3AC12FF,
  346.     0xFC42A8FF,
  347.     0x2FC827FF,
  348.     0x1A30BFFF,
  349.     0xB740C2FF,
  350.     0x42ACF5FF,
  351.     0x2FD9DEFF,
  352.     0xFAFB71FF,
  353.     0xA5D1CDFF,
  354.     0xC471BDFF,
  355.     0x94436EFF,
  356.     0xC1F7ECFF,
  357.     0xCE79EEFF,
  358.     0xBD1EF2FF,
  359.     0x93B7E4FF,
  360.     0x3214AAFF,
  361.     0x184D3BFF,
  362.     0xAE4B99FF,
  363.     0x7E49D7FF,
  364.     0x4C436EFF,
  365.     0xFA24CCFF,
  366.     0xCE76BEFF,
  367.     0xA04E0AFF,
  368.     0x9F945CFF,
  369.     0xDCDE3DFF,
  370.     0x10C9C5FF,
  371.     0x70524DFF,
  372.     0xFBE472FF,
  373.     0x8A2CD7FF,
  374.     0x6152C2FF,
  375.     0xCF72A9FF,
  376.     0xE59338FF,
  377.     0xEEDC2DFF,
  378.     0xD8C762FF,
  379.     0xD8C762FF
  380. };
  381. new VehicleList[][] = {
  382.     {"Landstalker"},
  383.     {"Bravura"},
  384.     {"Buffalo"},
  385.     {"Linerunner"},
  386.     {"Perenail"},
  387.     {"Sentinel"},
  388.     {"Dumper"},
  389.     {"Firetruck"},
  390.     {"Trashmaster"},
  391.     {"Stretch"},
  392.     {"Manana"},
  393.     {"Infernus"},
  394.     {"Voodoo"},
  395.     {"Pony"},
  396.     {"Mule"},
  397.     {"Cheetah"},
  398.     {"Ambulance"},
  399.     {"Levetian"},
  400.     {"Moonbeam"},
  401.     {"Esperanto"},
  402.     {"Taxi"},
  403.     {"Washington"},
  404.     {"Bobcat"},
  405.     {"Mr Whoopee"},
  406.     {"BF Injection"},
  407.     {"Hunter"},
  408.     {"Premier"},
  409.     {"Enforcer"},
  410.     {"Securicar"},
  411.     {"Banshee"},
  412.     {"Predator"},
  413.     {"Bus"},
  414.     {"Rhino"},
  415.     {"Barracks"},
  416.     {"Hotknife"},
  417.     {"Artic Trailer 1"},
  418.     {"Previon"},
  419.     {"Coach"},
  420.     {"Cabbie"},
  421.     {"Stallion"},
  422.     {"Rumpo"},
  423.     {"RC Bandit"},
  424.     {"Romero"},
  425.     {"Packer"},
  426.     {"Monster"},
  427.     {"Admiral"},
  428.     {"Squalo"},
  429.     {"Seasparrow"},
  430.     {"Pizza Boy"},
  431.     {"Tram"},
  432.     {"Artic Trailer 2"},
  433.     {"Turismo"},
  434.     {"Speeder"},
  435.     {"Reefer"},
  436.     {"Tropic"},
  437.     {"Flatbed"},
  438.     {"Yankee"},
  439.     {"Caddy"},
  440.     {"Solair"},
  441.     {"Top Fun"},
  442.     {"Skimmer"},
  443.     {"PCJ-600"},
  444.     {"Faggio"},
  445.     {"Freeway"},
  446.     {"RC Baron"},
  447.     {"RC Raider"},
  448.     {"Glendale"},
  449.     {"Oceanic"},
  450.     {"Sanchez"},
  451.     {"Sparrow"},
  452.     {"Patriot"},
  453.     {"Quad"},
  454.     {"Coastguard"},
  455.     {"Dinghy"},
  456.     {"Hermes"},
  457.     {"Sabre"},
  458.     {"Rustler"},
  459.     {"ZR-350"},
  460.     {"Walton"},
  461.     {"Regina"},
  462.     {"Comet"},
  463.     {"BMX"},
  464.     {"Burrito"},
  465.     {"Camper"},
  466.     {"Marquis"},
  467.     {"Baggage"},
  468.     {"Dozer"},
  469.     {"Maverick"},
  470.     {"SAN Maverick"},
  471.     {"Rancher"},
  472.     {"FBI Rancher"},
  473.     {"Virgo"},
  474.     {"Greenwood"},
  475.     {"Jetmax"},
  476.     {"Hotring"},
  477.     {"Sandking"},
  478.     {"Blista Compact"},
  479.     {"Police Maverick"},
  480.     {"Boxville"},
  481.     {"Benson"},
  482.     {"Mesa"},
  483.     {"RC Goblin"},
  484.     {"Hotring A"},
  485.     {"Hotring B"},
  486.     {"Bloodring Banger"},
  487.     {"Rancher (Lure)"},
  488.     {"Super GT"},
  489.     {"Elegant"},
  490.     {"Journey"},
  491.     {"Bike"},
  492.     {"Mountain Bike"},
  493.     {"Beagle"},
  494.     {"Cropduster"},
  495.     {"Stuntplane"},
  496.     {"Petrol"},
  497.     {"Roadtrain"},
  498.     {"Nebula"},
  499.     {"Majestic"},
  500.     {"Buccaneer"},
  501.     {"Shamal"},
  502.     {"Hydra"},
  503.     {"FCR-900"},
  504.     {"NRG-500"},
  505.     {"HPV-1000"},
  506.     {"Cement Truck"},
  507.     {"Tow Truck"},
  508.     {"Fortune"},
  509.     {"Cadrona"},
  510.     {"FBI Truck"},
  511.     {"Willard"},
  512.     {"Forklift"},
  513.     {"Tractor"},
  514.     {"Combine"},
  515.     {"Feltzer"},
  516.     {"Remington"},
  517.     {"Slamvan"},
  518.     {"Blade"},
  519.     {"Freight"},
  520.     {"Streak"},
  521.     {"Vortex"},
  522.     {"Vincent"},
  523.     {"Bullet"},
  524.     {"Clover"},
  525.     {"Sadler"},
  526.     {"Firetruck LS"},
  527.     {"Hustler"},
  528.     {"Intruder"},
  529.     {"Primo"},
  530.     {"Cargobob"},
  531.     {"Tampa"},
  532.     {"Sunrise"},
  533.     {"Merit"},
  534.     {"Utility Van"},
  535.     {"Nevada"},
  536.     {"Yosemite"},
  537.     {"Windsor"},
  538.     {"Monster A"},
  539.     {"Monster B"},
  540.     {"Uranus"},
  541.     {"Jester"},
  542.     {"Sultan"},
  543.     {"Stratum"},
  544.     {"Elegy"},
  545.     {"Raindance"},
  546.     {"RC Tiger"},
  547.     {"Flash"},
  548.     {"Tahoma"},
  549.     {"Savanna"},
  550.     {"Bandito"},
  551.     {"Freight Flat"},
  552.     {"Streak Trailer"},
  553.     {"Kart"},
  554.     {"Mower"},
  555.     {"Duneride"},
  556.     {"Sweeper"},
  557.     {"Broadway"},
  558.     {"Tornado"},
  559.     {"AT-400"},
  560.     {"DFT-30"},
  561.     {"Huntley"},
  562.     {"Stafford"},
  563.     {"BF-400"},
  564.     {"News Van"},
  565.     {"Tug"},
  566.     {"Petrol Tanker"},
  567.     {"Emperor"},
  568.     {"Wayfarer"},
  569.     {"Euros"},
  570.     {"Hotdog"},
  571.     {"Club"},
  572.     {"Freight Box"},
  573.     {"Artic Trailer"},
  574.     {"Andromada"},
  575.     {"Dodo"},
  576.     {"RC Cam"},
  577.     {"Launch"},
  578.     {"Cop Car LS"},
  579.     {"Cop Car SF"},
  580.     {"Cop Car LV"},
  581.     {"Ranger"},
  582.     {"Picador"},
  583.     {"Swat Tank"},
  584.     {"Alpha"},
  585.     {"Phoenix"},
  586.     {"Glendale (damaged)"},
  587.     {"Sadler (damaged)"},
  588.     {"Bag Box A"},
  589.     {"Bag Box B"},
  590.     {"Stairs"},
  591.     {"Boxville (black)"},
  592.     {"Farm Trailer"},
  593.     {"Utility Trailer"}
  594. };
  595.  
  596. main() {
  597.     return 1;
  598. }
  599.  
  600.   //--------------------------------------------------------------------------//
  601.  //                                 CALLBACK                                 //
  602. //--------------------------------------------------------------------------//
  603. public OnGameModeInit() {
  604.     mysql_init();
  605.     mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE);
  606.  
  607.     UsePlayerPedAnims();
  608.     EnableStuntBonusForAll(0);
  609.     DisableInteriorEnterExits();
  610.  
  611.     for(new i = 0; i < MAX_PLAYERS; i += 1) {
  612.         Player_Info[i][Player_Label] = Create3DTextLabel(" ", 0xFFFFFFFF, 200.0, 40.0, 50.0, 40.0, 0);
  613.     }
  614.  
  615.     for(new i = 0; i < MAX_VEHICLES; i += 1) {
  616.         Vehicle_Is_Server[i] = true;
  617.         Vehicle_Is_Public[i] = false;
  618.         Vehicle_Is_Private[i] = false;
  619.     }
  620.  
  621.     TextDraw_Godzina = TextDrawCreate(580.000000, 19.000000, "23:59");
  622.     TextDrawFont(TextDraw_Godzina, 3);
  623.     TextDrawLetterSize(TextDraw_Godzina, 0.600000, 2.000000);
  624.     TextDrawTextSize(TextDraw_Godzina, 400.000000, 17.000000);
  625.     TextDrawSetOutline(TextDraw_Godzina, 1);
  626.     TextDrawSetShadow(TextDraw_Godzina, 0);
  627.     TextDrawAlignment(TextDraw_Godzina, 2);
  628.     TextDrawColor(TextDraw_Godzina, -1);
  629.     TextDrawBackgroundColor(TextDraw_Godzina, 255);
  630.     TextDrawBoxColor(TextDraw_Godzina, 50);
  631.     TextDrawUseBox(TextDraw_Godzina, 0);
  632.     TextDrawSetProportional(TextDraw_Godzina, 1);
  633.     TextDrawSetSelectable(TextDraw_Godzina, 0);
  634.  
  635.     TextDraw_Data = TextDrawCreate(580.000000, 37.000000, "01.01.2019");
  636.     TextDrawFont(TextDraw_Data, 3);
  637.     TextDrawLetterSize(TextDraw_Data, 0.316666, 1.049998);
  638.     TextDrawTextSize(TextDraw_Data, 400.000000, 17.000000);
  639.     TextDrawSetOutline(TextDraw_Data, 1);
  640.     TextDrawSetShadow(TextDraw_Data, 0);
  641.     TextDrawAlignment(TextDraw_Data, 2);
  642.     TextDrawColor(TextDraw_Data, -1);
  643.     TextDrawBackgroundColor(TextDraw_Data, 255);
  644.     TextDrawBoxColor(TextDraw_Data, 50);
  645.     TextDrawUseBox(TextDraw_Data, 0);
  646.     TextDrawSetProportional(TextDraw_Data, 1);
  647.     TextDrawSetSelectable(TextDraw_Data, 0);
  648.    
  649.     TextDraw_Zabawy[0] = TextDrawCreate(2.000000, 236.000000, "/WG~n~~n~/DR~n~~n~/SM~n~~n~/WS~n~~n~/ST~n~~n~/SP~n~~n~/PK~n~~n~/SN~n~~n~/CH~n~~n~/IZ~n~~n~/OS");
  650.     TextDrawFont(TextDraw_Zabawy[0], 2);
  651.     TextDrawLetterSize(TextDraw_Zabawy[0], 0.180000, 0.899999);
  652.     TextDrawTextSize(TextDraw_Zabawy[0], 400.000000, 17.000000);
  653.     TextDrawSetOutline(TextDraw_Zabawy[0], 1);
  654.     TextDrawSetShadow(TextDraw_Zabawy[0], 0);
  655.     TextDrawAlignment(TextDraw_Zabawy[0], 1);
  656.     TextDrawColor(TextDraw_Zabawy[0], 10543359);
  657.     TextDrawBackgroundColor(TextDraw_Zabawy[0], 255);
  658.     TextDrawBoxColor(TextDraw_Zabawy[0], 50);
  659.     TextDrawUseBox(TextDraw_Zabawy[0], 0);
  660.     TextDrawSetProportional(TextDraw_Zabawy[0], 1);
  661.     TextDrawSetSelectable(TextDraw_Zabawy[0], 0);
  662.  
  663.     TextDraw_Zabawy[1] = TextDrawCreate(10.000000, 244.000000, "0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4~n~~n~0/4");
  664.     TextDrawFont(TextDraw_Zabawy[1], 2);
  665.     TextDrawLetterSize(TextDraw_Zabawy[1], 0.200000, 0.899999);
  666.     TextDrawTextSize(TextDraw_Zabawy[1], 400.000000, 17.000000);
  667.     TextDrawSetOutline(TextDraw_Zabawy[1], 1);
  668.     TextDrawSetShadow(TextDraw_Zabawy[1], 0);
  669.     TextDrawAlignment(TextDraw_Zabawy[1], 1);
  670.     TextDrawColor(TextDraw_Zabawy[1], -1);
  671.     TextDrawBackgroundColor(TextDraw_Zabawy[1], 255);
  672.     TextDrawBoxColor(TextDraw_Zabawy[1], 50);
  673.     TextDrawUseBox(TextDraw_Zabawy[1], 0);
  674.     TextDrawSetProportional(TextDraw_Zabawy[1], 1);
  675.     TextDrawSetSelectable(TextDraw_Zabawy[1], 0);
  676.    
  677.     TextDraw_Walizka[0] = TextDrawCreate(580.000000, 349.000000, "_");
  678.     TextDrawFont(TextDraw_Walizka[0], 1);
  679.     TextDrawLetterSize(TextDraw_Walizka[0], 0.600000, 0.000000);
  680.     TextDrawTextSize(TextDraw_Walizka[0], 298.500000, 105.000000);
  681.     TextDrawSetOutline(TextDraw_Walizka[0], 1);
  682.     TextDrawSetShadow(TextDraw_Walizka[0], 0);
  683.     TextDrawAlignment(TextDraw_Walizka[0], 2);
  684.     TextDrawColor(TextDraw_Walizka[0], -1);
  685.     TextDrawBackgroundColor(TextDraw_Walizka[0], 255);
  686.     TextDrawBoxColor(TextDraw_Walizka[0], -65401);
  687.     TextDrawUseBox(TextDraw_Walizka[0], 1);
  688.     TextDrawSetProportional(TextDraw_Walizka[0], 1);
  689.     TextDrawSetSelectable(TextDraw_Walizka[0], 0);
  690.  
  691.     TextDraw_Walizka[1] = TextDrawCreate(580.000000, 353.000000, "_");
  692.     TextDrawFont(TextDraw_Walizka[1], 1);
  693.     TextDrawLetterSize(TextDraw_Walizka[1], 0.600000, 4.399999);
  694.     TextDrawTextSize(TextDraw_Walizka[1], 298.500000, 105.000000);
  695.     TextDrawSetOutline(TextDraw_Walizka[1], 1);
  696.     TextDrawSetShadow(TextDraw_Walizka[1], 0);
  697.     TextDrawAlignment(TextDraw_Walizka[1], 2);
  698.     TextDrawColor(TextDraw_Walizka[1], -1);
  699.     TextDrawBackgroundColor(TextDraw_Walizka[1], 255);
  700.     TextDrawBoxColor(TextDraw_Walizka[1], 135);
  701.     TextDrawUseBox(TextDraw_Walizka[1], 1);
  702.     TextDrawSetProportional(TextDraw_Walizka[1], 1);
  703.     TextDrawSetSelectable(TextDraw_Walizka[1], 0);
  704.  
  705.     TextDraw_Walizka[2] = TextDrawCreate(627.000000, 353.000000, "] WALIZKA ]");
  706.     TextDrawFont(TextDraw_Walizka[2], 2);
  707.     TextDrawLetterSize(TextDraw_Walizka[2], 0.345833, 1.049998);
  708.     TextDrawTextSize(TextDraw_Walizka[2], 400.000000, 17.000000);
  709.     TextDrawSetOutline(TextDraw_Walizka[2], 1);
  710.     TextDrawSetShadow(TextDraw_Walizka[2], 0);
  711.     TextDrawAlignment(TextDraw_Walizka[2], 3);
  712.     TextDrawColor(TextDraw_Walizka[2], -2686721);
  713.     TextDrawBackgroundColor(TextDraw_Walizka[2], 255);
  714.     TextDrawBoxColor(TextDraw_Walizka[2], 50);
  715.     TextDrawUseBox(TextDraw_Walizka[2], 0);
  716.     TextDrawSetProportional(TextDraw_Walizka[2], 1);
  717.     TextDrawSetSelectable(TextDraw_Walizka[2], 0);
  718.  
  719.     TextDraw_Walizka[3] = TextDrawCreate(531.000000, 364.000000, "Podpowiedz:~n~> Niedaleko /Plaza");
  720.     TextDrawFont(TextDraw_Walizka[3], 1);
  721.     TextDrawLetterSize(TextDraw_Walizka[3], 0.237498, 0.750000);
  722.     TextDrawTextSize(TextDraw_Walizka[3], 990.500000, 489.500000);
  723.     TextDrawSetOutline(TextDraw_Walizka[3], 1);
  724.     TextDrawSetShadow(TextDraw_Walizka[3], 0);
  725.     TextDrawAlignment(TextDraw_Walizka[3], 1);
  726.     TextDrawColor(TextDraw_Walizka[3], -1);
  727.     TextDrawBackgroundColor(TextDraw_Walizka[3], 255);
  728.     TextDrawBoxColor(TextDraw_Walizka[3], 50);
  729.     TextDrawUseBox(TextDraw_Walizka[3], 0);
  730.     TextDrawSetProportional(TextDraw_Walizka[3], 1);
  731.     TextDrawSetSelectable(TextDraw_Walizka[3], 0);
  732.    
  733.     TextDraw_LicznikBox[0] = TextDrawCreate(320.000000, 349.000000, "_");
  734.     TextDrawFont(TextDraw_LicznikBox[0], 1);
  735.     TextDrawLetterSize(TextDraw_LicznikBox[0], 0.600000, 0.000000);
  736.     TextDrawTextSize(TextDraw_LicznikBox[0], 298.500000, 191.500000);
  737.     TextDrawSetOutline(TextDraw_LicznikBox[0], 1);
  738.     TextDrawSetShadow(TextDraw_LicznikBox[0], 0);
  739.     TextDrawAlignment(TextDraw_LicznikBox[0], 2);
  740.     TextDrawColor(TextDraw_LicznikBox[0], -1);
  741.     TextDrawBackgroundColor(TextDraw_LicznikBox[0], 255);
  742.     TextDrawBoxColor(TextDraw_LicznikBox[0], 9109639);
  743.     TextDrawUseBox(TextDraw_LicznikBox[0], 1);
  744.     TextDrawSetProportional(TextDraw_LicznikBox[0], 1);
  745.     TextDrawSetSelectable(TextDraw_LicznikBox[0], 0);
  746.  
  747.     TextDraw_LicznikBox[1] = TextDrawCreate(320.000000, 352.000000, "_");
  748.     TextDrawFont(TextDraw_LicznikBox[1], 1);
  749.     TextDrawLetterSize(TextDraw_LicznikBox[1], 0.600000, 5.349998);
  750.     TextDrawTextSize(TextDraw_LicznikBox[1], 303.500000, 191.500000);
  751.     TextDrawSetOutline(TextDraw_LicznikBox[1], 1);
  752.     TextDrawSetShadow(TextDraw_LicznikBox[1], 0);
  753.     TextDrawAlignment(TextDraw_LicznikBox[1], 2);
  754.     TextDrawColor(TextDraw_LicznikBox[1], -1);
  755.     TextDrawBackgroundColor(TextDraw_LicznikBox[1], 255);
  756.     TextDrawBoxColor(TextDraw_LicznikBox[1], 135);
  757.     TextDrawUseBox(TextDraw_LicznikBox[1], 1);
  758.     TextDrawSetProportional(TextDraw_LicznikBox[1], 1);
  759.     TextDrawSetSelectable(TextDraw_LicznikBox[1], 0);
  760.    
  761.     TextDraw_StatystykiBox[0] = TextDrawCreate(320.000000, 427.000000, "_");
  762.     TextDrawFont(TextDraw_StatystykiBox[0], 1);
  763.     TextDrawLetterSize(TextDraw_StatystykiBox[0], 0.600000, 0.000000);
  764.     TextDrawTextSize(TextDraw_StatystykiBox[0], 298.500000, 636.000000);
  765.     TextDrawSetOutline(TextDraw_StatystykiBox[0], 1);
  766.     TextDrawSetShadow(TextDraw_StatystykiBox[0], 0);
  767.     TextDrawAlignment(TextDraw_StatystykiBox[0], 2);
  768.     TextDrawColor(TextDraw_StatystykiBox[0], -1);
  769.     TextDrawBackgroundColor(TextDraw_StatystykiBox[0], 255);
  770.     TextDrawBoxColor(TextDraw_StatystykiBox[0], 9109639);
  771.     TextDrawUseBox(TextDraw_StatystykiBox[0], 1);
  772.     TextDrawSetProportional(TextDraw_StatystykiBox[0], 1);
  773.     TextDrawSetSelectable(TextDraw_StatystykiBox[0], 0);
  774.    
  775.     TextDraw_StatystykiBox[1] = TextDrawCreate(320.000000, 430.000000, "_");
  776.     TextDrawFont(TextDraw_StatystykiBox[1], 1);
  777.     TextDrawLetterSize(TextDraw_StatystykiBox[1], 0.600000, 1.799991);
  778.     TextDrawTextSize(TextDraw_StatystykiBox[1], 302.500000, 636.500000);
  779.     TextDrawSetOutline(TextDraw_StatystykiBox[1], 1);
  780.     TextDrawSetShadow(TextDraw_StatystykiBox[1], 0);
  781.     TextDrawAlignment(TextDraw_StatystykiBox[1], 2);
  782.     TextDrawColor(TextDraw_StatystykiBox[1], -1);
  783.     TextDrawBackgroundColor(TextDraw_StatystykiBox[1], 255);
  784.     TextDrawBoxColor(TextDraw_StatystykiBox[1], 135);
  785.     TextDrawUseBox(TextDraw_StatystykiBox[1], 1);
  786.     TextDrawSetProportional(TextDraw_StatystykiBox[1], 1);
  787.     TextDrawSetSelectable(TextDraw_StatystykiBox[1], 0);
  788.  
  789.     TextDraw_Gracze = TextDrawCreate(8.000000, 431.000000, "(~y~0~w~/~b~0~w~/~r~0~w~)");
  790.     TextDrawFont(TextDraw_Gracze, 1);
  791.     TextDrawLetterSize(TextDraw_Gracze, 0.291666, 1.200000);
  792.     TextDrawTextSize(TextDraw_Gracze, 400.000000, 17.000000);
  793.     TextDrawSetOutline(TextDraw_Gracze, 1);
  794.     TextDrawSetShadow(TextDraw_Gracze, 0);
  795.     TextDrawAlignment(TextDraw_Gracze, 1);
  796.     TextDrawColor(TextDraw_Gracze, -1);
  797.     TextDrawBackgroundColor(TextDraw_Gracze, 255);
  798.     TextDrawBoxColor(TextDraw_Gracze, 50);
  799.     TextDrawUseBox(TextDraw_Gracze, 0);
  800.     TextDrawSetProportional(TextDraw_Gracze, 1);
  801.     TextDrawSetSelectable(TextDraw_Gracze, 0);
  802.    
  803.     TextDraw_Areny = TextDrawCreate(634.000000, 433.000000, "/onede (0)   /arena (0)   /sniper (0)   /pump (0)");
  804.     TextDrawFont(TextDraw_Areny, 2);
  805.     TextDrawLetterSize(TextDraw_Areny, 0.145833, 1.000000);
  806.     TextDrawTextSize(TextDraw_Areny, 400.000000, 17.000000);
  807.     TextDrawSetOutline(TextDraw_Areny, 1);
  808.     TextDrawSetShadow(TextDraw_Areny, 0);
  809.     TextDrawAlignment(TextDraw_Areny, 3);
  810.     TextDrawColor(TextDraw_Areny, -1094795521);
  811.     TextDrawBackgroundColor(TextDraw_Areny, 255);
  812.     TextDrawBoxColor(TextDraw_Areny, 50);
  813.     TextDrawUseBox(TextDraw_Areny, 0);
  814.     TextDrawSetProportional(TextDraw_Areny, 1);
  815.     TextDrawSetSelectable(TextDraw_Areny, 0);
  816.  
  817.     TextDraw_Nazwa = TextDrawCreate(580.000000, 396.000000, "Polski ~r~Mega ~g~Serwer");
  818.     TextDrawFont(TextDraw_Nazwa, 0);
  819.     TextDrawLetterSize(TextDraw_Nazwa, 0.420832, 1.799998);
  820.     TextDrawTextSize(TextDraw_Nazwa, 400.000000, 192.000000);
  821.     TextDrawSetOutline(TextDraw_Nazwa, 1);
  822.     TextDrawSetShadow(TextDraw_Nazwa, 0);
  823.     TextDrawAlignment(TextDraw_Nazwa, 2);
  824.     TextDrawColor(TextDraw_Nazwa, -1);
  825.     TextDrawBackgroundColor(TextDraw_Nazwa, 255);
  826.     TextDrawBoxColor(TextDraw_Nazwa, 50);
  827.     TextDrawUseBox(TextDraw_Nazwa, 0);
  828.     TextDrawSetProportional(TextDraw_Nazwa, 1);
  829.     TextDrawSetSelectable(TextDraw_Nazwa, 0);
  830.    
  831.     TextDraw_Strona = TextDrawCreate(580.000000, 412.000000, "www.serwer-pms.ct8.pl");
  832.     TextDrawFont(TextDraw_Strona, 1);
  833.     TextDrawLetterSize(TextDraw_Strona, 0.283333, 1.250000);
  834.     TextDrawTextSize(TextDraw_Strona, 400.000000, 17.000000);
  835.     TextDrawSetOutline(TextDraw_Strona, 1);
  836.     TextDrawSetShadow(TextDraw_Strona, 0);
  837.     TextDrawAlignment(TextDraw_Strona, 2);
  838.     TextDrawColor(TextDraw_Strona, -1);
  839.     TextDrawBackgroundColor(TextDraw_Strona, 255);
  840.     TextDrawBoxColor(TextDraw_Strona, 50);
  841.     TextDrawUseBox(TextDraw_Strona, 0);
  842.     TextDrawSetProportional(TextDraw_Strona, 1);
  843.     TextDrawSetSelectable(TextDraw_Strona, 0);
  844.  
  845.     Bag_Info[Bag_Placed] = false;
  846.  
  847.     Bag_Info[Bag_Score] = 0;
  848.     Bag_Info[Bag_Money] = 0;
  849.  
  850.     SetTimer("OnShowAdvert", 600000, 1);
  851.     SetTimer("OnUpdatePlayer", 1000, 1);
  852.  
  853.     SendRconCommand("hostname [Ultra-H.com] ‹‹ •-•-• Polski Mega Serwer [DM] •-•-• ››");
  854.     SendRconCommand("gamemodetext Polski|DM|FR|FUN|PL|");
  855.     SendRconCommand("language PL Polski Polish");
  856.     SendRconCommand("mapname •PMS "#VERSION" PL•");
  857.     SendRconCommand("weburl www.serwer-pms.ct8.pl");
  858.     return 1;
  859. }
  860.  
  861. public OnPlayerConnect(playerid) {
  862.     new Query_0[384];
  863.     new Format_0[256];
  864.     new Strcat_0[256];
  865.  
  866.     for(new i = 0; i <= 100; i += 1) {
  867.         SendClientMessage(playerid, -1, "");
  868.     }
  869.  
  870.     GetPlayerName(playerid, Player_Info[playerid][Player_Username], MAX_PLAYER_NAME);
  871.     GetPlayerIp(playerid, Player_Info[playerid][Player_IP], 64);
  872.     gpci(playerid, Player_Info[playerid][Player_GPCI], 64);
  873.  
  874.     LoadBan(playerid);
  875.     SetPlayerRandomColor(playerid);
  876.  
  877.     Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, " ");
  878.     Attach3DTextLabelToPlayer(Player_Info[playerid][Player_Label], playerid, 0.0, 0.0, 0.7);
  879.  
  880.     format(Query_0, sizeof(Query_0), "SELECT `Username` FROM `Players` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
  881.     mysql_query(Query_0);
  882.    
  883.     mysql_store_result();
  884.    
  885.     if(!mysql_num_rows()) {
  886.         format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  887.         strcat(Strcat_0, Format_0);
  888.         strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
  889.         strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
  890.         strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
  891.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
  892.     }
  893.     else {
  894.         format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  895.         strcat(Strcat_0, Format_0);
  896.         strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
  897.         strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  898.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
  899.     }
  900.  
  901.     mysql_free_result();
  902.  
  903.     TextDraw_LicznikInformacje[playerid][0] = CreatePlayerTextDraw(playerid, 217.000000, 317.000000, "Preview_Model");
  904.     PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][0], 5);
  905.     PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][0], 0.600000, 2.000000);
  906.     PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][0], 109.000000, 107.500000);
  907.     PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
  908.     PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
  909.     PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][0], 2);
  910.     PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][0], -1);
  911.     PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
  912.     PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][0], 255);
  913.     PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
  914.     PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][0], 1);
  915.     PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
  916.     PlayerTextDrawSetPreviewModel(playerid, TextDraw_LicznikInformacje[playerid][0], 411);
  917.     PlayerTextDrawSetPreviewRot(playerid, TextDraw_LicznikInformacje[playerid][0], -10.000000, 0.000000, -35.000000, 1.000000);
  918.     PlayerTextDrawSetPreviewVehCol(playerid, TextDraw_LicznikInformacje[playerid][0], 1, 1);
  919.    
  920.     TextDraw_LicznikInformacje[playerid][1] = CreatePlayerTextDraw(playerid, 351.000000, 351.000000, "~y~] ~g~~h~Infernus ~y~]");
  921.     PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][1], 2);
  922.     PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][1], 0.304165, 1.100000);
  923.     PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][1], 400.000000, 327.000000);
  924.     PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][1], 1);
  925.     PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
  926.     PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][1], 2);
  927.     PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][1], -1);
  928.     PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][1], 255);
  929.     PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][1], 50);
  930.     PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
  931.     PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][1], 1);
  932.     PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
  933.  
  934.     TextDraw_LicznikInformacje[playerid][2] = CreatePlayerTextDraw(playerid, 407.000000, 368.000000, "~g~~h~Predkosc: ~y~~h~300km/h");
  935.     PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
  936.     PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][2], 0.241667, 0.850000);
  937.     PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][2], 400.000000, 17.000000);
  938.     PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
  939.     PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
  940.     PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][2], 3);
  941.     PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][2], -1);
  942.     PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][2], 255);
  943.     PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][2], 50);
  944.     PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
  945.     PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
  946.     PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
  947.  
  948.     TextDraw_LicznikInformacje[playerid][3] = CreatePlayerTextDraw(playerid, 407.000000, 376.000000, "~g~~h~Status: ~y~~h~Otwarty");
  949.     PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
  950.     PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][3], 0.241667, 0.850000);
  951.     PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][3], 400.000000, 17.000000);
  952.     PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
  953.     PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
  954.     PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][3], 3);
  955.     PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][3], -1);
  956.     PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][3], 255);
  957.     PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][3], 50);
  958.     PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
  959.     PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
  960.     PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
  961.  
  962.     TextDraw_LicznikInformacje[playerid][4] = CreatePlayerTextDraw(playerid, 407.000000, 385.000000, "~g~~h~Stan: ~y~~h~100/100");
  963.     PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
  964.     PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][4], 0.241667, 0.850000);
  965.     PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][4], 400.000000, 17.000000);
  966.     PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
  967.     PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
  968.     PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][4], 3);
  969.     PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][4], -1);
  970.     PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][4], 255);
  971.     PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][4], 50);
  972.     PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
  973.     PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
  974.     PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
  975.  
  976.     TextDraw_Nick[playerid] = CreatePlayerTextDraw(playerid, 90.000000, 431.000000, "Zielakless");
  977.     PlayerTextDrawFont(playerid, TextDraw_Nick[playerid], 1);
  978.     PlayerTextDrawLetterSize(playerid, TextDraw_Nick[playerid], 0.320832, 1.399999);
  979.     PlayerTextDrawTextSize(playerid, TextDraw_Nick[playerid], 400.000000, 252.000000);
  980.     PlayerTextDrawSetOutline(playerid, TextDraw_Nick[playerid], 1);
  981.     PlayerTextDrawSetShadow(playerid, TextDraw_Nick[playerid], 0);
  982.     PlayerTextDrawAlignment(playerid, TextDraw_Nick[playerid], 2);
  983.     PlayerTextDrawColor(playerid, TextDraw_Nick[playerid], 9109759);
  984.     PlayerTextDrawBackgroundColor(playerid, TextDraw_Nick[playerid], 16711935);
  985.     PlayerTextDrawBoxColor(playerid, TextDraw_Nick[playerid], 50);
  986.     PlayerTextDrawUseBox(playerid, TextDraw_Nick[playerid], 0);
  987.     PlayerTextDrawSetProportional(playerid, TextDraw_Nick[playerid], 1);
  988.     PlayerTextDrawSetSelectable(playerid, TextDraw_Nick[playerid], 0);
  989.    
  990.     TextDraw_Statystyki[playerid] = CreatePlayerTextDraw(playerid, 140.000000, 432.000000, "~g~~h~ID: ~w~666   ~g~~h~PING: ~w~777   ~g~~h~PL: ~w~6.66%   ~g~~h~EXP: ~w~666/777   ~g~~h~POZIOM: ~w~666   ~g~~h~ONLINE: ~w~23H 59MIN   ~g~~h~VIP: ~w~TAK");
  991.     PlayerTextDrawFont(playerid, TextDraw_Statystyki[playerid], 1);
  992.     PlayerTextDrawLetterSize(playerid, TextDraw_Statystyki[playerid], 0.162499, 1.250000);
  993.     PlayerTextDrawTextSize(playerid, TextDraw_Statystyki[playerid], 855.000000, -453.000000);
  994.     PlayerTextDrawSetOutline(playerid, TextDraw_Statystyki[playerid], 1);
  995.     PlayerTextDrawSetShadow(playerid, TextDraw_Statystyki[playerid], 0);
  996.     PlayerTextDrawAlignment(playerid, TextDraw_Statystyki[playerid], 1);
  997.     PlayerTextDrawColor(playerid, TextDraw_Statystyki[playerid], -1);
  998.     PlayerTextDrawBackgroundColor(playerid, TextDraw_Statystyki[playerid], 255);
  999.     PlayerTextDrawBoxColor(playerid, TextDraw_Statystyki[playerid], 50);
  1000.     PlayerTextDrawUseBox(playerid, TextDraw_Statystyki[playerid], 0);
  1001.     PlayerTextDrawSetProportional(playerid, TextDraw_Statystyki[playerid], 1);
  1002.     PlayerTextDrawSetSelectable(playerid, TextDraw_Statystyki[playerid], 0);
  1003.    
  1004.     Player_Info[playerid][Player_Logged] = false;
  1005.     Player_Info[playerid][Player_Is_Admin] = false;
  1006.     Player_Info[playerid][Player_Away] = false;
  1007.    
  1008.     Player_Info[playerid][Player_Unique_ID] = 0;
  1009.     Player_Info[playerid][Player_Score] = 0;
  1010.     Player_Info[playerid][Player_Money] = 0;
  1011.     Player_Info[playerid][Player_Admin] = 0;
  1012.     Player_Info[playerid][Player_Kills] = 0;
  1013.     Player_Info[playerid][Player_Deaths] = 0;
  1014.     Player_Info[playerid][Player_Killstreak] = 0;
  1015.     Player_Info[playerid][Player_Skin] = 0;
  1016.     Player_Info[playerid][Player_Priv_Car] = 0;
  1017.     Player_Info[playerid][Player_On_Arena] = 0;
  1018.     Player_Info[playerid][Player_Bags] = 0;
  1019.     Player_Info[playerid][Player_Online_Time] = 0;
  1020.  
  1021.     Command_Info[playerid][Command_Naj] = 0;
  1022.     Command_Info[playerid][Command_Zw] = 0;
  1023.  
  1024.     Priv_Car_Info[playerid][Priv_Car_Model] = 0;
  1025.     Priv_Car_Info[playerid][Priv_Car_Main_Color] = 0;
  1026.     Priv_Car_Info[playerid][Priv_Car_Primary_Color] = 0;
  1027.     Priv_Car_Info[playerid][Priv_Car_Paintjob] = 4;
  1028.     Priv_Car_Info[playerid][Priv_Car_Fuel_Type] = 0;
  1029.  
  1030.     Priv_Car_Info[playerid][Priv_Car_Fuel] = 0;
  1031.     Priv_Car_Info[playerid][Priv_Car_Mileage] = 0;
  1032.     Priv_Car_Info[playerid][Priv_Car_Parking_X] = 0;
  1033.     Priv_Car_Info[playerid][Priv_Car_Parking_Y] = 0;
  1034.     Priv_Car_Info[playerid][Priv_Car_Parking_Z] = 0;
  1035.     Priv_Car_Info[playerid][Priv_Car_Parking_A] = 0;
  1036.    
  1037.     SendClientMessage(playerid, -1, "{FFFF00}*******************************************************");
  1038.     SendClientMessage(playerid, -1, "{C2C2C2}Witamy na << {FFFFFF}Polski {FF0000}Mega {66CC33}Serwer {C2C2C2}>>.");
  1039.     SendClientMessage(playerid, -1, "{66CC33}> {FF9900}Witamy na serwerze! Wszystkie komendy znajdziesz wpisując {FFFFAA}/cmd{FF9900}.");
  1040.     SendClientMessage(playerid, -1, "{66CC33}> {A6A3C5}Dołącz do gry, zdobywaj poziomy i zostań największym gangsterem na dzielnicy!");
  1041.     SendClientMessage(playerid, -1, "{66CC33}> {66CC33}Podoba Ci się serwer? Dodaj go do ulubionych! {91E567}94.23.208.199:8005{66CC33}.");
  1042.     SendClientMessage(playerid, -1, "{66CC33}> {B2B285}Miłej gry na serwerze życzy Administracja!");
  1043.     SendClientMessage(playerid, -1, "{66CC33}> {C2C2C2}Ostatnia kompilacja mapy: {FF6666}"#UPDATE" {C2C2C2}przez {FF6666}"#AUTHOR"{C2C2C2}.");
  1044.     SendClientMessage(playerid, -1, "{FFFF00}*******************************************************");
  1045.     return 1;
  1046. }
  1047.  
  1048. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
  1049.     switch(dialogid) {
  1050.         case DIALOG_NOTHING: {
  1051.             if(!response) {
  1052.                 return 1;
  1053.             }
  1054.  
  1055.             else if(response) {
  1056.                 return 1;
  1057.             }
  1058.         }
  1059.  
  1060.         case DIALOG_REGISTER: {
  1061.             if(!response) {
  1062.                 KickEx(playerid);
  1063.             }
  1064.  
  1065.             else if(response) {
  1066.                 new Query_0[384];
  1067.                 new Format_0[256], Format_1[256];
  1068.                 new Strcat_0[256];
  1069.  
  1070.                 if(strlen(inputtext) == 0) {
  1071.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1072.                     strcat(Strcat_0, Format_1);
  1073.                     strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
  1074.                     strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
  1075.                     strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
  1076.                     return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
  1077.                 }
  1078.  
  1079.                 if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
  1080.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1081.                     strcat(Strcat_0, Format_1);
  1082.                     strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
  1083.                     strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
  1084.                     strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
  1085.                     return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
  1086.                 }
  1087.  
  1088.                 Player_Info[playerid][Player_Logged] = true;
  1089.  
  1090.                 format(Format_0, sizeof(Format_0), "{67D1B0}Mamy nowego zarejestrowanego gracza! {FFFF00}%s {67D1B0}witamy!", Player_Info[playerid][Player_Username]);
  1091.                 mysql_query(Format_0);
  1092.  
  1093.                 format(Query_0, sizeof(Query_0), "INSERT INTO `Players` (`Username`, `Password`) VALUES ('%s', md5('%s'));", Player_Info[playerid][Player_Username], inputtext);
  1094.                 mysql_query(Query_0);
  1095.             }
  1096.         }
  1097.  
  1098.         case DIALOG_LOGIN: {
  1099.             if(!response) {
  1100.                 KickEx(playerid);
  1101.             }
  1102.  
  1103.             else if(response) {
  1104.                 new Query_0[384], Query_1[384], Query_2[384];
  1105.                 new Label_0[384];
  1106.                 new Format_0[256], Format_1[256];
  1107.                 new Strcat_0[256];
  1108.  
  1109.                 if(strlen(inputtext) == 0) {
  1110.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witamy ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1111.                     strcat(Strcat_0, Format_1);
  1112.                     strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
  1113.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1114.                     return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
  1115.                 }
  1116.  
  1117.                 if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
  1118.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1119.                     strcat(Strcat_0, Format_1);
  1120.                     strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
  1121.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1122.                     return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
  1123.                 }
  1124.                
  1125.                 format(Query_0, sizeof(Query_0), "SELECT `Username` FROM `Admins` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
  1126.                 mysql_query(Query_0);
  1127.  
  1128.                 mysql_store_result();
  1129.  
  1130.                 if(!mysql_num_rows()) {
  1131.                     Player_Info[playerid][Player_Is_Admin] = false;
  1132.                 }
  1133.                 else {
  1134.                     Player_Info[playerid][Player_Is_Admin] = true;
  1135.  
  1136.                     callcmd::alogin(playerid);
  1137.                 }
  1138.  
  1139.                 mysql_free_result();
  1140.                
  1141.                 format(Query_1, sizeof(Query_1), "SELECT * FROM `Players` WHERE `Username` = '%s' AND `Password` = md5('%s');", Player_Info[playerid][Player_Username], inputtext);
  1142.                 mysql_query(Query_1);
  1143.                
  1144.                 mysql_store_result();
  1145.  
  1146.                 if(!mysql_num_rows()) {
  1147.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1148.                     strcat(Strcat_0, Format_1);
  1149.                     strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
  1150.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1151.                     return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
  1152.                 }
  1153.                 else {
  1154.                     mysql_fetch_field("Unique_ID", Query_1);
  1155.                     Player_Info[playerid][Player_Unique_ID] = strval(Query_1);
  1156.  
  1157.                     mysql_fetch_field("Score", Query_1);
  1158.                     Player_Info[playerid][Player_Score] = strval(Query_1);
  1159.  
  1160.                     mysql_fetch_field("Money", Query_1);
  1161.                     Player_Info[playerid][Player_Money] = strval(Query_1);
  1162.  
  1163.                     mysql_fetch_field("Kills", Query_1);
  1164.                     Player_Info[playerid][Player_Kills] = strval(Query_1);
  1165.  
  1166.                     mysql_fetch_field("Deaths", Query_1);
  1167.                     Player_Info[playerid][Player_Deaths] = strval(Query_1);
  1168.  
  1169.                     mysql_fetch_field("Killstreak", Query_1);
  1170.                     Player_Info[playerid][Player_Killstreak] = strval(Query_1);
  1171.  
  1172.                     mysql_fetch_field("Skin", Query_1);
  1173.                     Player_Info[playerid][Player_Skin] = strval(Query_1);
  1174.  
  1175.                     mysql_fetch_field("Bags", Query_1);
  1176.                     Player_Info[playerid][Player_Bags] = strval(Query_1);
  1177.                 }
  1178.  
  1179.                 mysql_free_result();
  1180.                
  1181.                 format(Query_2, sizeof(Query_2), "SELECT `Username` FROM `Vehicles` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
  1182.                 mysql_query(Query_2);
  1183.  
  1184.                 mysql_store_result();
  1185.  
  1186.                 if(!mysql_num_rows()) {
  1187.                     return 1;
  1188.                 }
  1189.                 else {
  1190.                     mysql_fetch_field("Model", Query_2);
  1191.                     Priv_Car_Info[playerid][Priv_Car_Model] = strval(Query_2);
  1192.  
  1193.                     mysql_fetch_field("Main_Color", Query_2);
  1194.                     Priv_Car_Info[playerid][Priv_Car_Main_Color] = strval(Query_2);
  1195.  
  1196.                     mysql_fetch_field("Primary_Color", Query_2);
  1197.                     Priv_Car_Info[playerid][Priv_Car_Primary_Color] = strval(Query_2);
  1198.  
  1199.                     mysql_fetch_field("Paintjob", Query_2);
  1200.                     Priv_Car_Info[playerid][Priv_Car_Paintjob] = strval(Query_2);
  1201.  
  1202.                     mysql_fetch_field("Mileage", Query_2);
  1203.                     Priv_Car_Info[playerid][Priv_Car_Mileage] = floatstr(Query_2);
  1204.  
  1205.                     mysql_fetch_field("Fuel", Query_2);
  1206.                     Priv_Car_Info[playerid][Priv_Car_Fuel] = floatstr(Query_2);
  1207.  
  1208.                     mysql_fetch_field("Fuel_Type", Query_2);
  1209.                     Priv_Car_Info[playerid][Priv_Car_Fuel_Type] = strval(Query_2);
  1210.  
  1211.                     mysql_fetch_field("Parking_X", Query_2);
  1212.                     Priv_Car_Info[playerid][Priv_Car_Parking_X] = floatstr(Query_2);
  1213.  
  1214.                     mysql_fetch_field("Parking_Y", Query_2);
  1215.                     Priv_Car_Info[playerid][Priv_Car_Parking_Y] = floatstr(Query_2);
  1216.  
  1217.                     mysql_fetch_field("Parking_Z", Query_2);
  1218.                     Priv_Car_Info[playerid][Priv_Car_Parking_Z] = floatstr(Query_2);
  1219.  
  1220.                     mysql_fetch_field("Parking_A", Query_2);
  1221.                     Priv_Car_Info[playerid][Priv_Car_Parking_A] = floatstr(Query_2);
  1222.                 }
  1223.  
  1224.                 mysql_free_result();
  1225.  
  1226.                 Player_Info[playerid][Player_Priv_Car] = AddStaticVehicle(Priv_Car_Info[playerid][Priv_Car_Model], Priv_Car_Info[playerid][Priv_Car_Parking_X], Priv_Car_Info[playerid][Priv_Car_Parking_Y], Priv_Car_Info[playerid][Priv_Car_Parking_Z],
  1227.                 Priv_Car_Info[playerid][Priv_Car_Parking_A], Priv_Car_Info[playerid][Priv_Car_Main_Color], Priv_Car_Info[playerid][Priv_Car_Primary_Color]);
  1228.  
  1229.                 ChangeVehiclePaintjob(Player_Info[playerid][Player_Priv_Car], Priv_Car_Info[playerid][Priv_Car_Paintjob]);
  1230.  
  1231.                 SetVehicleInterior(Player_Info[playerid][Player_Priv_Car], 0);
  1232.                 SetVehicleVirtualWorld(Player_Info[playerid][Player_Priv_Car], 0);
  1233.  
  1234.                 Vehicle_Is_Server[Player_Info[playerid][Player_Priv_Car]] = false;
  1235.                 Vehicle_Is_Public[Player_Info[playerid][Player_Priv_Car]] = false;
  1236.                 Vehicle_Is_Private[Player_Info[playerid][Player_Priv_Car]] = true;
  1237.  
  1238.                 Player_Info[playerid][Player_Logged] = true;
  1239.  
  1240.                 switch(Priv_Car_Info[playerid][Priv_Car_Fuel_Type]) {
  1241.                     case 0: {
  1242.                         format(Label_0, sizeof(Label_0), "{B87333}PRYWATNY POJAZD\n{C2C2C2}Właściciel {FFFF00}%s\n{C2C2C2}Przebieg {FFFF00}%.0fkm\n{C2C2C2}Paliwo {FFFF00}%.0fL {66CC33}(PB'98)", Player_Info[playerid][Player_Username], Priv_Car_Info[playerid][Priv_Car_Mileage], Priv_Car_Info[playerid][Priv_Car_Fuel);
  1243.                     }
  1244.  
  1245.                     case 1: {
  1246.                         format(Label_0, sizeof(Label_0), "{B87333}PRYWATNY POJAZD\n{C2C2C2}Właściciel {FFFF00}%s\n{C2C2C2}Przebieg {FFFF00}%.0fkm\n{C2C2C2}Paliwo {FFFF00}%.0fL {B87333}(Diesel)", Player_Info[playerid][Player_Username], Priv_Car_Info[playerid][Priv_Car_Mileage], Priv_Car_Info[playerid][Priv_Car_Fuel);
  1247.                     }
  1248.  
  1249.                     case 2: {
  1250.                         format(Label_0, sizeof(Label_0), "{B87333}PRYWATNY POJAZD\n{C2C2C2}Właściciel {FFFF00}%s\n{C2C2C2}Przebieg {FFFF00}%.0fkm\n{C2C2C2}Paliwo {FFFF00}%.0fL {63AFF0}(LPG)", Player_Info[playerid][Player_Username], Priv_Car_Info[playerid][Priv_Car_Mileage], Priv_Car_Info[playerid][Priv_Car_Fuel);
  1251.                     }
  1252.                 }
  1253.  
  1254.                 Priv_Car_Info[playerid][Priv_Car_Label] = Create3DTextLabel(Label_0, -1, 0.0, 0.0, 0.0, 20, 0, 1);
  1255.                 Attach3DTextLabelToVehicle(Priv_Car_Info[playerid][Priv_Car_Label], Player_Info[playerid][Player_Priv_Car], 0.0, 0.0, 0.0);
  1256.  
  1257.                 format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID: %d] {FF9900}dołączył do serwera.", Player_Info[playerid][Player_Username]);
  1258.                 mysql_query(Format_0);
  1259.             }
  1260.         }
  1261.  
  1262.         case DIALOG_ADMIN_PASSWORD: {
  1263.             if(!response) {
  1264.                 Player_Info[playerid][Player_Is_Admin] = false;
  1265.                 return Player_Info[playerid][Player_Admin] = 0;
  1266.             }
  1267.  
  1268.             else if(response) {
  1269.                 new Query_0[256];
  1270.                 new Format_0[384];
  1271.                 new Strcat_0[384];
  1272.  
  1273.                 if(strlen(inputtext) == 0) {
  1274.                     format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1275.                     strcat(Strcat_0, Format_0);
  1276.                     strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
  1277.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1278.                     return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
  1279.                 }
  1280.  
  1281.                 if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
  1282.                     format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1283.                     strcat(Strcat_0, Format_0);
  1284.                     strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
  1285.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1286.                     return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
  1287.                 }
  1288.  
  1289.                 format(Query_0, sizeof(Query_0), "INSERT INTO `Admins` (`Username`, `Password`, `Level`) VALUES ('%s', md5('%s'), '%d');", Player_Info[playerid][Player_Username], inputtext, Player_Info[playerid][Player_Admin]);
  1290.                 mysql_query(Query_0);
  1291.             }
  1292.         }
  1293.  
  1294.         case DIALOG_ADMIN_LOGIN: {
  1295.             if(!response) {
  1296.                 return 1;
  1297.             }
  1298.  
  1299.             else if(response) {
  1300.                 new Query_0[384];
  1301.                 new Format_0[384];
  1302.                 new Strcat_0[384];
  1303.  
  1304.                 format(Query_0, sizeof(Query_0), "SELECT `Level` FROM `Admins` WHERE `Username` = '%s' AND `Password` = md5('%s');", Player_Info[playerid][Player_Username], inputtext);
  1305.                 mysql_query(Query_0);
  1306.                
  1307.                 mysql_store_result();
  1308.                
  1309.                 if(!mysql_num_rows()) {
  1310.                     new Format_1[128];
  1311.  
  1312.                     format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  1313.                     strcat(Strcat_0, Format_1);
  1314.                     strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
  1315.                     strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  1316.                     return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
  1317.                 }
  1318.                 else {
  1319.                     mysql_fetch_field("Level", Query_0);
  1320.                     Player_Info[playerid][Player_Admin] = strval(Query_0);
  1321.                 }
  1322.                
  1323.                 mysql_free_result();
  1324.                
  1325.                 format(Format_0, sizeof(Format_0), "{63AFF0}Witaj {FFFFAA}%s {63AFF0}autoryzacja zakończona sukcesem! Ranga %s {63AFF0}została Ci przyznana.", Player_Info[playerid][Player_Username], GetPlayerAdmin(playerid));
  1326.                 SendClientMessage(playerid, -1, Format_0);
  1327.             }
  1328.         }
  1329.     }
  1330.     return 1;
  1331. }
  1332.  
  1333. public OnPlayerRequestClass(playerid, classid) {
  1334.     if(Player_Info[playerid][Player_Skin] != 0) {
  1335.         SetPlayerSkin(playerid, Player_Info[playerid][Player_Skin]);
  1336.     }
  1337.  
  1338.     SetPlayerPos(playerid, 3390.5515, 1679.1806, 106.6665);
  1339.     SetPlayerFacingAngle(playerid, 89.9263);
  1340.     SetPlayerCameraPos(playerid, 3385.5515, 1679.1871, 106.6665);
  1341.     SetPlayerCameraLookAt(playerid, 3390.5515, 1679.1806, 106.6665);
  1342.     return 1;
  1343. }
  1344.  
  1345. public OnPlayerSpawn(playerid) {
  1346.     for(new i = 0; i < 2; i += 1) {
  1347.         TextDrawShowForPlayer(playerid, TextDraw_Zabawy[i]);
  1348.     }
  1349.  
  1350.     for(new i = 0; i < 2; i += 1) {
  1351.         TextDrawShowForPlayer(playerid, TextDraw_StatystykiBox[i]);
  1352.     }
  1353.    
  1354.     SetPlayerRandomSpawn(playerid);
  1355.     GivePlayerWeapons(playerid);
  1356.  
  1357.     PlayerTextDrawShow(playerid, TextDraw_Nick[playerid]);
  1358.     PlayerTextDrawShow(playerid, TextDraw_Statystyki[playerid]);
  1359.  
  1360.     TextDrawShowForPlayer(playerid, TextDraw_Godzina);
  1361.     TextDrawShowForPlayer(playerid, TextDraw_Data);
  1362.     TextDrawShowForPlayer(playerid, TextDraw_Gracze);
  1363.     TextDrawShowForPlayer(playerid, TextDraw_Areny);
  1364.     TextDrawShowForPlayer(playerid, TextDraw_Nazwa);
  1365.     TextDrawShowForPlayer(playerid, TextDraw_Strona);
  1366.     return 1;
  1367. }
  1368.  
  1369. public OnPlayerUpdate(playerid) {
  1370.     SetPlayerScore(playerid, Player_Info[playerid][Player_Score]);
  1371.  
  1372.     ResetPlayerMoney(playerid);
  1373.     GivePlayerMoney(playerid, Player_Info[playerid][Player_Money]);
  1374.     return 1;
  1375. }
  1376.  
  1377. public OnPlayerStateChange(playerid, newstate, oldstate) {
  1378.     if(newstate == PLAYER_STATE_DRIVER) {
  1379.         for(new i = 0; i < 5; i += 1) {
  1380.             PlayerTextDrawShow(playerid, TextDraw_LicznikInformacje[playerid][i]);
  1381.         }
  1382.  
  1383.         for(new i = 0; i < 2; i += 1) {
  1384.             TextDrawShowForPlayer(playerid, TextDraw_LicznikBox[i]);
  1385.         }
  1386.  
  1387.         PlayerTextDrawSetPreviewModel(playerid, TextDraw_LicznikInformacje[playerid][0], GetVehicleModel(GetPlayerVehicleID(playerid)));
  1388.     }
  1389.  
  1390.     else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) {
  1391.         for(new i = 0; i < 5; i += 1) {
  1392.             PlayerTextDrawHide(playerid, TextDraw_LicznikInformacje[playerid][i]);
  1393.         }
  1394.  
  1395.         for(new i = 0; i < 2; i += 1) {
  1396.             TextDrawHideForPlayer(playerid, TextDraw_LicznikBox[i]);
  1397.         }
  1398.     }
  1399.     return 1;
  1400. }
  1401.  
  1402. public OnPlayerPickUpDynamicPickup(playerid, pickupid) {
  1403.     if(pickupid == Bag_Info[Bag_Pickup]) {
  1404.         new Format_0[384];
  1405.  
  1406.         for(new i = 0; i < 4; i += 1) {
  1407.             TextDrawHideForAll(TextDraw_Walizka[i]);
  1408.         }
  1409.  
  1410.         DestroyDynamicPickup(Bag_Info[Bag_Pickup]);
  1411.  
  1412.         Bag_Info[Bag_Placed] = false;
  1413.  
  1414.         Player_Info[playerid][Player_Score] += Bag_Info[Bag_Score];
  1415.         Player_Info[playerid][Player_Money] += Bag_Info[Bag_Money];
  1416.         Player_Info[playerid][Player_Bags] += 1;
  1417.  
  1418.         format(Format_0, sizeof(Format_0), "{FFFF00}%s [ID:%i] {FF9900}znalazł(a) walizkę po raz {FFFF00}%d{FF9900}! Nagroda {FFFF00}%dexp {FF9900}+ {FFFF00}%d$", Player_Info[playerid][Player_Username], playerid, Player_Info[playerid][Player_Bags], Bag_Info[Bag_Score], Bag_Info[Bag_Money]);
  1419.         SendClientMessageToAll(-1, Format_0);
  1420.     }
  1421.     return 1;
  1422. }
  1423.  
  1424. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
  1425.     if(KEY_PRESSED(KEY_FIRE)) {
  1426.         if(IsPlayerInAnyVehicle(playerid) == 1) {
  1427.             if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
  1428.                 AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  1429.             }
  1430.         }
  1431.     }
  1432.  
  1433.     else if(KEY_RELEASED(KEY_FIRE)) {
  1434.         RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  1435.     }
  1436.  
  1437.     if(KEY_PRESSED(KEY_SUBMISSION)) {
  1438.         if(IsPlayerInAnyVehicle(playerid)) {
  1439.             if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
  1440.                 callcmd::napraw(playerid);
  1441.             }
  1442.         }
  1443.     }
  1444.     return 1;
  1445. }
  1446.  
  1447. public OnPlayerText(playerid, text[]) {
  1448.     new Format_0[512];
  1449.  
  1450.     text[0] = toupper(text[0]);
  1451.  
  1452.     switch(Player_Info[playerid][Player_Admin]) {
  1453.         case 0: {
  1454.             format(Format_0, sizeof(Format_0), "{%06x}%s {C2C2C2}(Gracz ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1455.         }
  1456.  
  1457.         case 1: {
  1458.             format(Format_0, sizeof(Format_0), "{%06x}%s {FFCC99}(Eventowicz ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1459.         }
  1460.  
  1461.         case 2: {
  1462.             format(Format_0, sizeof(Format_0), "{%06x}%s {66CC33}(Moderator ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1463.         }
  1464.  
  1465.         case 3: {
  1466.             format(Format_0, sizeof(Format_0), "{%06x}%s {FF6666}(Admin ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1467.         }
  1468.  
  1469.         case 4: {
  1470.             format(Format_0, sizeof(Format_0), "{%06x}%s {17CDDF}(Elite Admin ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1471.         }
  1472.  
  1473.         case 5: {
  1474.             format(Format_0, sizeof(Format_0), "{%06x}%s {FF9900}(Head Admin ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
  1475.         }
  1476.     }
  1477.  
  1478.     SendClientMessageToAll(-1, Format_0);
  1479.     return 0;
  1480. }
  1481.  
  1482. public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) {
  1483.     if(result == -1) {
  1484.         return SendClientMessage(playerid, -1, "{66CC33}Nie ma takiej komendy! {FFFF00}Zobacz: {F7A26F}/cmd{FFFF00}.");
  1485.     }
  1486.     return 1;
  1487. }
  1488.  
  1489. public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) {
  1490.     if(issuerid != INVALID_PLAYER_ID) {
  1491.         if(weapon == 33 || weapon == 34) {
  1492.             if(bodypart == 9) {
  1493.                 SetPlayerHealth(playerid, 0);
  1494.             }
  1495.         }
  1496.  
  1497.         PlayerPlaySound(issuerid, 17802, 0, 0, 0);
  1498.     }
  1499.     return 1;
  1500. }
  1501.  
  1502. /*public OnPlayerDeath(playerid, killerid, reason) {
  1503.     if(killerid == INVALID_PLAYER_ID) {
  1504.         return 1;
  1505.     }
  1506.     else {
  1507.         return 1;
  1508.     }
  1509.     return 1;
  1510. }*/
  1511.  
  1512. public OnPlayerDisconnect(playerid, reason) {
  1513.     SavePlayerStats(playerid);
  1514.     return 1;
  1515. }
  1516.  
  1517. public OnGameModeExit() {
  1518.     foreach(Player, i) {
  1519.         if(Player_Info[i][Player_Logged] == true) {
  1520.             OnPlayerDisconnect(i, 1);
  1521.         }
  1522.     }
  1523.     return 1;
  1524. }
  1525.  
  1526.   //--------------------------------------------------------------------------//
  1527.  //                                 STOCK                                    //
  1528. //--------------------------------------------------------------------------//
  1529. stock GetPlayerLevel(playerid) {
  1530.     new Level;
  1531.  
  1532.     do {
  1533.         Level += 1;
  1534.     }
  1535.  
  1536.     while(Level * Level * 15 < Player_Info[playerid][Player_Score]);
  1537.  
  1538.     return (Level - 1 < 1) ? 1 : Level - 1;
  1539. }
  1540.  
  1541. stock GetPlayerNextLevel(playerid) {
  1542.     return (GetPlayerLevel(playerid) + 1) * (GetPlayerLevel(playerid) + 1) * 15;
  1543. }
  1544.  
  1545. stock GetPlayerAdmin(playerid) {
  1546.     new Admin[32];
  1547.    
  1548.     switch(Player_Info[playerid][Player_Admin]) {
  1549.         case 1: {
  1550.             Admin = "{FFCC99}Eventowicz";
  1551.         }
  1552.        
  1553.         case 2: {
  1554.             Admin = "{66CC33}Moderator";
  1555.         }
  1556.        
  1557.         case 3: {
  1558.             Admin = "{FF6666}Admin";
  1559.         }
  1560.        
  1561.         case 4: {
  1562.             Admin = "{17CDDF}Elite Admin";
  1563.         }
  1564.        
  1565.         case 5: {
  1566.             Admin = "{FF9900}Head Admin";
  1567.         }
  1568.     }
  1569.     return Admin;
  1570. }
  1571.  
  1572. stock GetAdmins() {
  1573.     new Admins;
  1574.  
  1575.     foreach(Player, i) {
  1576.         if(Player_Info[i][Player_Admin] == 5 || Player_Info[i][Player_Admin] == 4 || Player_Info[i][Player_Admin] == 3) {
  1577.             Admins += 1;
  1578.         }
  1579.     }
  1580.     return Admins;
  1581. }
  1582.  
  1583. stock GetModerators() {
  1584.     new Moderators;
  1585.  
  1586.     foreach(Player, i) {
  1587.         if(Player_Info[i][Player_Admin] == 2 || Player_Info[i][Player_Admin] == 1) {
  1588.             Moderators += 1;
  1589.         }
  1590.     }
  1591.     return Moderators;
  1592. }
  1593.  
  1594. /*stock GetVIPs() {
  1595.     new VIPs;
  1596.  
  1597.     foreach(Player, i) {
  1598.         if(PlayerInfo[i][PLayer_VIP] != 0) {
  1599.             VIPs += 1;
  1600.         }
  1601.     }
  1602.     return VIPs;
  1603. }*/
  1604.  
  1605. stock GetPlayerVehicleSpeed(vehicleid) {
  1606.     new Float:fX, Float:fY, Float:fZ;
  1607.  
  1608.     GetVehicleVelocity(vehicleid, fX, fY, fZ);
  1609.     return floatround(floatsqroot(fX * fX + fY * fY + fZ * fZ) * 170.00);
  1610. }
  1611.  
  1612. stock SetPlayerRandomColor(playerid) {
  1613.     new i = random(sizeof(ColorList));
  1614.     return SetPlayerColor(playerid, ColorList[i]);
  1615. }
  1616.  
  1617. stock BanPlayer(playernick[], playerid, adminnick[], adminid, czas, powod[], playerip[], playergpci[]) {
  1618.     new Rok, Miesiac, Dzien, Godzina, Minuta;
  1619.     new Query_0[512];
  1620.     new Format_0[512];
  1621.    
  1622.     gettime(Godzina, Minuta, _);
  1623.     getdate(Rok, Miesiac, Dzien);
  1624.  
  1625.     TogglePlayerSpectating(playerid, 1);
  1626.  
  1627.     KickEx(playerid);
  1628.  
  1629.     format(Query_0, sizeof(Query_0), "INSERT INTO `Bans` (`Username`, `Admin`, `Time`, `Date`, `Reason`, `IP`, `GPCI`) VALUES ('%s', '%s', '%d', '%02d:%02d | %02d.%02d.%d', '%s', '%s', '%s');",
  1630.     playernick, adminnick, gettime() + 24 * 60 * 60 * czas, Godzina, Minuta, Dzien, Miesiac, Rok, powod, playerip, playergpci);
  1631.     mysql_query(Query_0);
  1632.  
  1633.     format(Format_0, sizeof(Format_0), "{FFFF00}%s [ID:%i] {FF0000}został(a) zbanowany(a) przez %s [ID:%i].", playernick, playerid, adminnick, adminid);
  1634.     SendClientMessageToAll(-1, Format_0);
  1635.     format(Format_0, sizeof(Format_0), "{FF0000}Powód: %s", powod);
  1636.     SendClientMessageToAll(-1, Format_0);
  1637.     SendClientMessage(playerid, -1, "{63AFF0}Myślisz, że zostałeś(aś) niesłusznie zbanowany(a)? Napisz na forum www.serwer-pms.ct8.pl.");
  1638.     SendClientMessage(playerid, -1, "{63AFF0}Do wniosku o UB potrzebny jest screen z gry. Zrób screen za pomocą przycisku F8!");
  1639.     return 1;
  1640. }
  1641.  
  1642. stock KickEx(playerid)
  1643. {
  1644.     return SetTimerEx("Kick_Ex", 250, 0, "d", playerid);
  1645. }
  1646.  
  1647. stock KickPlayer(playernick[], playerid, adminnick[], adminid, powod[]) {
  1648.     new Format_0[512];
  1649.  
  1650.     TogglePlayerSpectating(playerid, 1);
  1651.  
  1652.     KickEx(playerid);
  1653.  
  1654.     format(Format_0, sizeof(Format_0), "{FFFF00}%s [ID:%i] {FF0000}został(a) wyrzucony(a) przez %s [ID:%i].", playernick, playerid, adminnick, adminid);
  1655.     SendClientMessageToAll(-1, Format_0);
  1656.     format(Format_0, sizeof(Format_0), "{FF0000}Powód: %s", powod);
  1657.     SendClientMessageToAll(-1, Format_0);
  1658.     SendClientMessage(playerid, -1, "{63AFF0}Myślisz, że zostałeś(aś) niesłusznie wyrzucony(a)? Napisz na forum www.serwer-pms.ct8.pl.");
  1659.     return 1;
  1660. }
  1661.  
  1662. stock LoadBan(playerid) {
  1663.     new Query_0[256];
  1664.  
  1665.     format(Query_0, sizeof(Query_0), "SELECT * FROM `Bans` WHERE `Username` = '%s' OR `IP` = '%s' OR `GPCI` = '%s';", Player_Info[playerid][Player_Username], Player_Info[playerid][Player_IP], Player_Info[playerid][Player_GPCI]);
  1666.     mysql_query(Query_0);
  1667.  
  1668.     mysql_store_result();
  1669.  
  1670.     if(!mysql_num_rows()) {
  1671.         return 1;
  1672.     }
  1673.     else {
  1674.         new Gracz[MAX_PLAYER_NAME], Admin[MAX_PLAYER_NAME], Czas, Data[64], Powod[64], IP[64], GPCI[64];
  1675.  
  1676.         mysql_fetch_field("Username", Gracz);
  1677.         mysql_fetch_field("Admin", Admin);
  1678.         mysql_fetch_field("Time", Query_0);
  1679.         Czas = strval(Query_0);
  1680.         mysql_fetch_field("Date", Data);
  1681.         mysql_fetch_field("Reason", Powod);
  1682.         mysql_fetch_field("IP", IP);
  1683.         mysql_fetch_field("GPCI", GPCI);
  1684.  
  1685.         if(Czas > gettime()) {
  1686.             new Format_0[384];
  1687.  
  1688.             SendClientMessage(playerid, -1, "{63AFF0}To IP oraz Nick jest zbanowane czasowo.");
  1689.             format(Format_0, sizeof(Format_0), "Ban do: {66CC33}@NULL");
  1690.             SendClientMessage(playerid, -1, Format_0);
  1691.             format(Format_0, sizeof(Format_0), "Twoje IP: {66CC33}%s", IP);
  1692.             SendClientMessage(playerid, -1, Format_0);
  1693.             format(Format_0, sizeof(Format_0), "Nick banującego: {66CC33}%s", Admin);
  1694.             SendClientMessage(playerid, -1, Format_0);
  1695.             format(Format_0, sizeof(Format_0), "Data zdarzenia: {66CC33}%s", Data);
  1696.             SendClientMessage(playerid, -1, Format_0);
  1697.             format(Format_0, sizeof(Format_0), "Powód: {66CC33}%s", Powod);
  1698.             SendClientMessage(playerid, -1, Format_0);
  1699.             SendClientMessage(playerid, -1, "{FFFF00}Jeżeli chcesz wyjaśnić tą sytuację przed czasem, napisz na forum {66CC33}www.serwer-pms.ct8.pl {FFFF00}według wzoru.");
  1700.             return KickEx(playerid);
  1701.         }
  1702.         else {
  1703.             new Query_1[128];
  1704.  
  1705.             format(Query_1, sizeof(Query_1), "DELETE FROM `Bans` WHERE `Username` = '%s' OR `IP` = '%s' OR `GPCI` = '%s';", Gracz, IP, GPCI);
  1706.             mysql_query(Query_1);
  1707.         }
  1708.     }
  1709.  
  1710.     mysql_free_result();
  1711.     return 1;
  1712. }
  1713.  
  1714. stock SavePlayerStats(playerid) {
  1715.     new Query_0[512];
  1716.    
  1717.     format(Query_0, sizeof(Query_0), "UPDATE `Players` SET `Score` = '%d', `Money` = '%d', `Kills` = '%d', `Deaths` = '%d', `Killstreak` = '%d', `Skin` = '%d', `Bags` = '%d' WHERE `Username` = '%s';",
  1718.     Player_Info[playerid][Player_Score], Player_Info[playerid][Player_Money], Player_Info[playerid][Player_Kills], Player_Info[playerid][Player_Deaths], Player_Info[playerid][Player_Killstreak], Player_Info[playerid][Player_Skin], Player_Info[playerid][Player_Bags], Player_Info[playerid][Player_Username]);
  1719.     mysql_query(Query_0);
  1720.     return 1;
  1721. }
  1722.  
  1723.   //--------------------------------------------------------------------------//
  1724.  //                                 PRIVATE                                  //
  1725. //--------------------------------------------------------------------------//
  1726. private OnShowAdvert() {
  1727.     new Format_0[512];
  1728.  
  1729.     format(Format_0, sizeof(Format_0), "{C5345B}Zapraszamy na forum tego serwera {FFFF00}www.serwer-pms.ct8.pl{C5345B}, mozesz tam uzyskać też pomoc i zintegrować się z innymi z naszej społeczności.");
  1730.     SendClientMessageToAll(-1, Format_0);
  1731.     format(Format_0, sizeof(Format_0), "{C5345B}Potrzebujesz szybkiego kontaktu z właścicielem serwera? Zobacz {FFFF00}/kontakt {C5345B}(Tylko pilne, pozostałą pomoc uzyskasz na forum).");
  1732.     SendClientMessageToAll(-1, Format_0);
  1733.     format(Format_0, sizeof(Format_0), "{C5345B}Chcesz porozmawiać? Zapraszamy na nasz serwer TeamSpeak3 IP: {FFFF00}ts.serwer-pms.pl{C5345B}. Oferujemy m.in. kanały prywatne dla gangu.");
  1734.     SendClientMessageToAll(-1, Format_0);
  1735.     format(Format_0, sizeof(Format_0), "{C5345B}Ten serwer to nie wszystko! W naszej ofercie mamy też serwer {66CC33}Minecraft {C5345B}oraz {63AFF0}CS 1.6 FFA{C5345B}. Życzymy miłej gry!");
  1736.     SendClientMessageToAll(-1, Format_0);
  1737.     return 1;
  1738. }
  1739.  
  1740. private SetPlayerRandomSpawn(playerid) {
  1741.     switch(Player_Info[playerid][Player_On_Arena]) {
  1742.         case 0: {
  1743.             new i = random(sizeof(FreeroamSpawnList));
  1744.  
  1745.             SetPlayerPos(playerid, FreeroamSpawnList[i][0], FreeroamSpawnList[i][1], FreeroamSpawnList[i][2]);
  1746.         }
  1747.     }
  1748.     return 1;
  1749. }
  1750.  
  1751. private GivePlayerWeapons(playerid) {
  1752.     new Format_0[384];
  1753.  
  1754.     switch(Player_Info[playerid][Player_On_Arena]) {
  1755.         case 0..4: {
  1756.             GivePlayerWeapon(playerid, 1, 1);
  1757.             GivePlayerWeapon(playerid, 7, 1);
  1758.             GivePlayerWeapon(playerid, 24, 500);
  1759.             GivePlayerWeapon(playerid, 25, 500);
  1760.             GivePlayerWeapon(playerid, 32, 500);
  1761.             GivePlayerWeapon(playerid, 33, 500);
  1762.            
  1763.             format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}1/5{FF9900}.", GetPlayerLevel(playerid));
  1764.             SendClientMessage(playerid, -1, Format_0);
  1765.             SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
  1766.         }
  1767.  
  1768.         case 5..12: {
  1769.             GivePlayerWeapon(playerid, 1, 1);
  1770.             GivePlayerWeapon(playerid, 5, 1);
  1771.             GivePlayerWeapon(playerid, 24, 500);
  1772.             GivePlayerWeapon(playerid, 25, 500);
  1773.             GivePlayerWeapon(playerid, 29, 500);
  1774.             GivePlayerWeapon(playerid, 33, 500);
  1775.  
  1776.             format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}2/5{FF9900}.", GetPlayerLevel(playerid));
  1777.             SendClientMessage(playerid, -1, Format_0);
  1778.             SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
  1779.         }
  1780.  
  1781.         case 13..18: {
  1782.             GivePlayerWeapon(playerid, 1, 1);
  1783.             GivePlayerWeapon(playerid, 8, 1);
  1784.             GivePlayerWeapon(playerid, 24, 500);
  1785.             GivePlayerWeapon(playerid, 27, 500);
  1786.             GivePlayerWeapon(playerid, 29, 500);
  1787.             GivePlayerWeapon(playerid, 30, 500);
  1788.             GivePlayerWeapon(playerid, 34, 500);
  1789.  
  1790.             format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}3/5{FF9900}.", GetPlayerLevel(playerid));
  1791.             SendClientMessage(playerid, -1, Format_0);
  1792.             SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
  1793.         }
  1794.  
  1795.         case 19..30: {
  1796.             GivePlayerWeapon(playerid, 1, 1);
  1797.             GivePlayerWeapon(playerid, 8, 1);
  1798.             GivePlayerWeapon(playerid, 24, 500);
  1799.             GivePlayerWeapon(playerid, 26, 500);
  1800.             GivePlayerWeapon(playerid, 29, 500);
  1801.             GivePlayerWeapon(playerid, 30, 500);
  1802.             GivePlayerWeapon(playerid, 34, 500);
  1803.  
  1804.             format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}4/5{FF9900}.", GetPlayerLevel(playerid));
  1805.             SendClientMessage(playerid, -1, Format_0);
  1806.             SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
  1807.         }
  1808.  
  1809.         default: {
  1810.             GivePlayerWeapon(playerid, 1, 1);
  1811.             GivePlayerWeapon(playerid, 4, 1);
  1812.             GivePlayerWeapon(playerid, 24, 500);
  1813.             GivePlayerWeapon(playerid, 26, 500);
  1814.             GivePlayerWeapon(playerid, 29, 500);
  1815.             GivePlayerWeapon(playerid, 31, 500);
  1816.             GivePlayerWeapon(playerid, 34, 500);
  1817.  
  1818.             format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}5/5{FF9900}.", GetPlayerLevel(playerid));
  1819.             SendClientMessage(playerid, -1, Format_0);
  1820.             SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
  1821.         }
  1822.     }
  1823.     return 1;
  1824. }
  1825.  
  1826. private OnUpdatePlayer() {
  1827.     foreach(Player, i) {
  1828.         new Year, Month, Day, Hour, Minute;
  1829.         new Format_0[MAX_PLAYER_NAME], Format_1[512], Format_2[64], Format_3[64], Format_4[64];
  1830.  
  1831.         OnUpdateLabel(i);
  1832.  
  1833.         gettime(Hour, Minute, _);
  1834.         getdate(Year, Month, Day);
  1835.  
  1836.         if(IsPlayerInAnyVehicle(i)) {
  1837.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
  1838.                 new Format_99[64], Format_98[64], Format_97[64], Format_96[64];
  1839.                 new Float:VehicleHealth;
  1840.  
  1841.                 if(IsPlayerInVehicle(playersid, PlayerInfo[playersid][PlayerPrivateVehicle])) {
  1842.                
  1843.                 }
  1844.  
  1845.                 GetVehicleHealth(GetPlayerVehicleID(i), VehicleHealth);
  1846.  
  1847.                 format(Format_99, sizeof(Format_99), "~y~] ~g~~h~%s ~y~]", VehicleList[GetVehicleModel(GetPlayerVehicleID(i)) - 400]);
  1848.                 PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][1], Format_99);
  1849.                
  1850.                 format(Format_98, sizeof(Format_98), "~g~~h~Predkosc: ~y~~h~%dkm/h", GetPlayerVehicleSpeed(GetPlayerVehicleID(i)));
  1851.                 PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][2], Format_98);
  1852.                
  1853.                 format(Format_97, sizeof(Format_97), "~g~~h~Status: ~y~~h~Otwarty");
  1854.                 PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][3], Format_97);
  1855.                
  1856.                 format(Format_96, sizeof(Format_96), "~g~~h~Stan: ~y~~h~%.0f/100", VehicleHealth / 10);
  1857.                 PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][4], Format_96);
  1858.             }
  1859.         }
  1860.  
  1861.         format(Format_0, sizeof(Format_0), "%s", Player_Info[i][Player_Username]);
  1862.         PlayerTextDrawSetString(i, TextDraw_Nick[i], Format_0);
  1863.  
  1864.         format(Format_1, sizeof(Format_1), "~g~~h~ID: ~w~%i   ~g~~h~PING: ~w~%d   ~g~~h~PL: ~w~%.2f%%   ~g~~h~EXP: ~w~%d/%d   ~g~~h~POZIOM: ~w~%d   ~g~~h~ONLINE: ~w~%02dH %02dMIN   ~g~~h~VIP: ~w~TAK",
  1865.         i, GetPlayerPing(i), NetStats_PacketLossPercent(i), Player_Info[i][Player_Score], GetPlayerNextLevel(i), GetPlayerLevel(i), (Player_Info[i][Player_Online_Time] / 60) / 60, (Player_Info[i][Player_Online_Time] / 60) % 60);
  1866.         PlayerTextDrawSetString(i, TextDraw_Statystyki[i], Format_1);
  1867.  
  1868.         format(Format_2, sizeof(Format_2), "%02d:%02d", Hour, Minute);
  1869.         TextDrawSetString(TextDraw_Godzina, Format_2);
  1870.  
  1871.         format(Format_3, sizeof(Format_3), "%02d.%02d.%d", Day, Month, Year);
  1872.         TextDrawSetString(TextDraw_Data, Format_3);
  1873.  
  1874.         format(Format_4, sizeof(Format_4), "(~y~0~w~/~b~%d~w~/~r~%d~w~)"/*, GetVIPs()*/, GetModerators(), GetAdmins());
  1875.         TextDrawSetString(TextDraw_Gracze, Format_4);
  1876.  
  1877.         Player_Info[i][Player_Online_Time] += 1;
  1878.  
  1879. /*      format(Format_0, sizeof(Format_0), "");
  1880.         PlayerTextDrawSetString(i, JakisTD, Format_0);
  1881.  
  1882.         format(Format_0, sizeof(Format_0), "");
  1883.         TextDrawSetString(JakisTD, Format_0);*/
  1884.     }
  1885.     return 1;
  1886. }
  1887.  
  1888. private OnUpdateLabel(playerid) {
  1889.     new Format_0[384];
  1890.  
  1891.     switch(Player_Info[playerid][Player_Admin]) {
  1892.         case 0: {
  1893.             format(Format_0, sizeof(Format_0), "{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1894.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1895.         }
  1896.  
  1897.         case 1: {
  1898.             format(Format_0, sizeof(Format_0), "{FFCC99}Eventowicz\n{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1899.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1900.         }
  1901.  
  1902.         case 2: {
  1903.             format(Format_0, sizeof(Format_0), "{66CC33}Moderator\n{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1904.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1905.         }
  1906.        
  1907.         case 3: {
  1908.             format(Format_0, sizeof(Format_0), "{FF6666}Admin\n{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1909.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1910.         }
  1911.        
  1912.         case 4: {
  1913.             format(Format_0, sizeof(Format_0), "{17CDDF}Elite Admin\n{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1914.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1915.         }
  1916.  
  1917.         case 5: {
  1918.             format(Format_0, sizeof(Format_0), "{FF9900}Head Admin\n{FF0000}EXP: {00FF00}%d {FFFFFF}/{00FF00}%d\n{FF0000}Poziom: {00FF00}%d", Player_Info[playerid][Player_Score], GetPlayerNextLevel(playerid), GetPlayerLevel(playerid));
  1919.             Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
  1920.         }
  1921.     }
  1922.     return 1;
  1923. }
  1924.  
  1925. private Kick_Ex(playerid)
  1926. {
  1927.     return Kick(playerid);
  1928. }
  1929.  
  1930.   //--------------------------------------------------------------------------//
  1931.  //                         HEAD ADMIN COMMAND                               //
  1932. //--------------------------------------------------------------------------//
  1933. CMD:setadmin(playerid, cmdtext[]) {
  1934.     new IDGracza, Poziom;
  1935.     new Query_0[384];
  1936.     new Format_0[256], Format_1[256];
  1937.     new Strcat_0[256];
  1938.  
  1939.     if(IsPlayerAdmin(playerid) == 0) {
  1940.         if(Player_Info[playerid][Player_Admin] < 5) {
  1941.             return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  1942.         }
  1943.     }
  1944.  
  1945.     if(sscanf(cmdtext, "dd", IDGracza, Poziom)) {
  1946.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Setadmin [ID/Nick] [Poziom].", "Zamknij", "");
  1947.     }
  1948.  
  1949.     if(!IsPlayerConnected(IDGracza)) {
  1950.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
  1951.     }
  1952.  
  1953.     if(Poziom < 0 || Poziom > 5) {
  1954.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Podany admin jest niepoprawny!");
  1955.     }
  1956.  
  1957.     if(Player_Info[IDGracza][Player_Is_Admin] == true) {
  1958.         if(Poziom <= 0) {
  1959.             Player_Info[IDGracza][Player_Is_Admin] = false;
  1960.  
  1961.             format(Query_0, sizeof(Query_0), "DELETE FROM `Admins` WHERE `Username` = '%s';", Player_Info[IDGracza][Player_Username]);
  1962.             mysql_query(Query_0);
  1963.  
  1964.             format(Format_0, sizeof(Format_0), "{FF9900}Usunąłeś/aś graczowi {FFFF00}%s [ID:%i] {FF9900}rangę %s{FF9900}.", Player_Info[IDGracza][Player_Username], IDGracza, GetPlayerAdmin(IDGracza));
  1965.             SendClientMessage(playerid, -1, Format_0);
  1966.  
  1967.             format(Format_1, sizeof(Format_1), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}usunął Ci rangę %s{FF9900}.", Player_Info[playerid][Player_Username], playerid, GetPlayerAdmin(IDGracza));
  1968.             SendClientMessage(IDGracza, -1, Format_1);
  1969.  
  1970.             return Player_Info[IDGracza][Player_Admin] = 0;
  1971.         }
  1972.  
  1973.         Player_Info[IDGracza][Player_Admin] = Poziom;
  1974.  
  1975.         format(Query_0, sizeof(Query_0), "UPDATE `Admins` SET `Level` = '%d' WHERE `Username` = '%s';", Player_Info[IDGracza][Player_Admin], Player_Info[IDGracza][Player_Username]);
  1976.         mysql_query(Query_0);
  1977.  
  1978.         format(Format_0, sizeof(Format_0), "{FF9900}Zmieniłeś/aś graczowi {FFFF00}%s [ID:%i] {FF9900}rangę na %s{FF9900}.", Player_Info[IDGracza][Player_Username], IDGracza, GetPlayerAdmin(IDGracza));
  1979.         SendClientMessage(playerid, -1, Format_0);
  1980.  
  1981.         format(Format_1, sizeof(Format_1), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}zmienił Ci rangę na %s{FF9900}.", Player_Info[playerid][Player_Username], playerid, GetPlayerAdmin(IDGracza));
  1982.         SendClientMessage(IDGracza, -1, Format_1);
  1983.     }
  1984.  
  1985.     else if(Player_Info[IDGracza][Player_Is_Admin] == false) {
  1986.         Player_Info[playerid][Player_Is_Admin] = true;
  1987.  
  1988.         Player_Info[playerid][Player_Admin] = Poziom;
  1989.  
  1990.         format(Format_0, sizeof(Format_0), "{FF9900}Nadałeś/aś graczowi {FFFF00}%s [ID:%i] {FF9900}rangę %s{FF9900}.", Player_Info[IDGracza][Player_Username], IDGracza, GetPlayerAdmin(IDGracza));
  1991.         SendClientMessage(playerid, -1, Format_0);
  1992.  
  1993.         format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[IDGracza][Player_Username]);
  1994.         strcat(Strcat_0, Format_0);
  1995.         strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
  1996.         strcat(Strcat_0, "Musisz się zarejestrować, aby twój admin był aktywny.\n");
  1997.         strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
  1998.         ShowPlayerDialog(IDGracza, DIALOG_ADMIN_PASSWORD, DIALOG_STYLE_INPUT, "Informacja", Strcat_0, "Ustaw", "");
  1999.     }
  2000.     return 1;
  2001. }
  2002.  
  2003.   //--------------------------------------------------------------------------//
  2004.  //                         ELITE ADMIN COMMAND                              //
  2005. //--------------------------------------------------------------------------//
  2006.  
  2007.   //--------------------------------------------------------------------------//
  2008.  //                         ADMIN COMMAND                                    //
  2009. //--------------------------------------------------------------------------//
  2010. CMD:ban(playerid, cmdtext[]) {
  2011.     new IDGracza;
  2012.     new Powod[256];
  2013.     new Czas;
  2014.  
  2015.     if(Player_Info[playerid][Player_Admin] <= 3) {
  2016.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  2017.     }
  2018.  
  2019.     if(sscanf(cmdtext, "dds[256]", IDGracza, Czas, Powod)) {
  2020.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Ban [ID/Nick] [Czas] [Powód].", "Zamknij", "");
  2021.     }
  2022.  
  2023.     if(!IsPlayerConnected(IDGracza)) {
  2024.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
  2025.     }
  2026.  
  2027.     BanPlayer(Player_Info[IDGracza][Player_Username], IDGracza, Player_Info[playerid][Player_Username], playerid, Czas, Powod, Player_Info[IDGracza][Player_IP], Player_Info[IDGracza][Player_GPCI]);
  2028.     return 1;
  2029. }
  2030.  
  2031.   //--------------------------------------------------------------------------//
  2032.  //                         MODERATOR COMMAND                                //
  2033. //--------------------------------------------------------------------------//
  2034. CMD:kick(playerid, cmdtext[]) {
  2035.     new IDGracza;
  2036.     new Powod[256];
  2037.  
  2038.     if(Player_Info[playerid][Player_Admin] <= 2) {
  2039.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  2040.     }
  2041.  
  2042.     if(sscanf(cmdtext, "ds[256]", IDGracza, Powod)) {
  2043.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Kick [ID/Nick] [Powód].", "Zamknij", "");
  2044.     }
  2045.  
  2046.     if(!IsPlayerConnected(IDGracza)) {
  2047.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
  2048.     }
  2049.  
  2050.     KickPlayer(Player_Info[IDGracza][Player_Username], IDGracza, Player_Info[playerid][Player_Username], playerid, Powod);
  2051.     return 1;
  2052. }
  2053.  
  2054. CMD:walizka(playerid, cmdtext[]) {
  2055.     new EXP, Kasa;
  2056.     new Podpowiedz[256];
  2057.     new Format0[256], Format2[128];
  2058.     new Float:fX, Float:fY, Float:fZ;
  2059.  
  2060.     if(Player_Info[playerid][Player_Admin] <= 2) {
  2061.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  2062.     }
  2063.  
  2064.     if(sscanf(cmdtext, "dds[256]", EXP, Kasa, Podpowiedz)) {
  2065.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Walizka [EXP] [Kasa] [Podpowiedź].", "Zamknij", "");
  2066.     }
  2067.  
  2068.     if(Bag_Info[Bag_Placed] == true) {
  2069.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Walizka jest już na mapie!");
  2070.     }
  2071.  
  2072.     for(new i = 0; i < 4; i += 1) {
  2073.         TextDrawShowForAll(TextDraw_Walizka[i]);
  2074.     }
  2075.  
  2076.     GetPlayerPos(playerid, fX, fY, fZ);
  2077.     Bag_Info[Bag_Pickup] = CreateDynamicPickup(1210, 23, fX, fY, fZ);
  2078.  
  2079.     Bag_Info[Bag_Placed] = true;
  2080.  
  2081.     Bag_Info[Bag_Score] = EXP;
  2082.     Bag_Info[Bag_Money] = Kasa;
  2083.  
  2084.     format(Format0, sizeof(Format0), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}zgubił walizkę. Podpowiedź: {FFFF00}%s", Player_Info[playerid][Player_Username], playerid, Podpowiedz);
  2085.     SendClientMessageToAll(-1, Format0);
  2086.  
  2087.     format(Format2, sizeof(Format2), "Podpowiedz:~n~> %s", Podpowiedz);
  2088.     TextDrawSetString(TextDraw_Walizka[3], Format2);
  2089.     return 1;
  2090. }
  2091.  
  2092. CMD:delwalizka(playerid) {
  2093.     new Format0[128];
  2094.  
  2095.     if(Player_Info[playerid][Player_Admin] <= 2) {
  2096.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  2097.     }
  2098.  
  2099.     if(Bag_Info[Bag_Placed] == false) {
  2100.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Walizki nie ma na mapie!");
  2101.     }
  2102.  
  2103.     for(new i = 0; i < 4; i += 1) {
  2104.         TextDrawHideForAll(TextDraw_Walizka[i]);
  2105.     }
  2106.  
  2107.     DestroyDynamicPickup(Bag_Info[Bag_Pickup]);
  2108.  
  2109.     Bag_Info[Bag_Placed] = false;
  2110.  
  2111.     Bag_Info[Bag_Score] = 0;
  2112.     Bag_Info[Bag_Money] = 0;
  2113.  
  2114.     format(Format0, sizeof(Format0), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}usunął walizkę.", Player_Info[playerid][Player_Username], playerid);
  2115.     SendClientMessageToAll(-1, Format0);
  2116.     return 1;
  2117. }
  2118.  
  2119.   //--------------------------------------------------------------------------//
  2120.  //                         EVENTOWICZ COMMAND                               //
  2121. //--------------------------------------------------------------------------//
  2122. CMD:alogin(playerid) {
  2123.     new Format_0[384];
  2124.     new Strcat_0[384];
  2125.  
  2126.     if(Player_Info[playerid][Player_Is_Admin] == false) {
  2127.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
  2128.     }
  2129.  
  2130.     if(Player_Info[playerid][Player_Admin] == 0) {
  2131.         format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
  2132.         strcat(Strcat_0, Format_0);
  2133.         strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
  2134.         strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
  2135.         return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Zamknij");
  2136.     }
  2137.  
  2138.     if(Player_Info[playerid][Player_Admin] != 0) {
  2139.         format(Format_0, sizeof(Format_0), "{63AFF0}Witaj {FFFFAA}%s {63AFF0}autoryzacja zakończona sukcesem! Ranga %s {63AFF0}została Ci odebrana.", Player_Info[playerid][Player_Username], GetPlayerAdmin(playerid));
  2140.  
  2141.         Player_Info[playerid][Player_Admin] = 0;
  2142.  
  2143.         return SendClientMessage(playerid, -1, Format_0);
  2144.     }
  2145.     return 1;
  2146. }
  2147.  
  2148.   //--------------------------------------------------------------------------//
  2149.  //                         PLAYER COMMAND                                   //
  2150. //--------------------------------------------------------------------------//
  2151. CMD:zw(playerid) {
  2152.     new Format_0[256];
  2153.  
  2154.     if(GetTickCount() < Command_Info[playerid][Command_Zw]) {
  2155.         new Format_1[256];
  2156.  
  2157.         format(Format_1, sizeof(Format_1), "{00EEAD}Tej komendy można użyć dopiero za {FFFF00}%d {00EEAD}sekund!", Command_Info[playerid][Command_Zw] - GetTickCount() / 1000 + 1);
  2158.         return SendClientMessage(playerid, -1, Format_1);
  2159.     }
  2160.  
  2161.     if(Player_Info[playerid][Player_Away] == true) {
  2162.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Jesteś już AFK!");
  2163.     }
  2164.  
  2165.     TogglePlayerControllable(playerid, 0);
  2166.  
  2167.     Player_Info[playerid][Player_Away] = true;
  2168.    
  2169.     Command_Info[playerid][Command_Zw] = 30000;
  2170.    
  2171.     format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID:%i] {FF9900}zaraz wraca (AFK).", Player_Info[playerid][Player_Username], playerid);
  2172.     SendClientMessageToAll(-1, Format_0);
  2173.     return 1;
  2174. }
  2175.  
  2176. CMD:jj(playerid) {
  2177.     new Format_0[256];
  2178.  
  2179.     if(Player_Info[playerid][Player_Away] == false) {
  2180.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie jesteś AFK!");
  2181.     }
  2182.  
  2183.     TogglePlayerControllable(playerid, 1);
  2184.  
  2185.     Player_Info[playerid][Player_Away] = false;
  2186.  
  2187.     format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID:%i] {FF9900}już jest!", Player_Info[playerid][Player_Username], playerid);
  2188.     SendClientMessageToAll(-1, Format_0);
  2189.     return 1;
  2190. }
  2191.  
  2192. CMD:pm(playerid, cmdtext[]) {
  2193.     new IDGracza;
  2194.     new Wiadomosc[256];
  2195.     new Format_0[256], Format_1[256];
  2196.  
  2197.     if(sscanf(cmdtext, "ds[256]", IDGracza, Wiadomosc)) {
  2198.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Pm [ID/Nick] [Wiadomość].", "Zamknij", "");
  2199.     }
  2200.  
  2201.     if(!IsPlayerConnected(IDGracza)) {
  2202.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
  2203.     }
  2204.    
  2205.     if(IDGracza == playerid) {
  2206.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie możesz pisać sam do siebie!");
  2207.     }
  2208.  
  2209.     PlayerPlaySound(IDGracza, 1057, 0.0, 0.0, 0.0);
  2210.  
  2211.     format(Format_0, sizeof(Format_0), "{FFFF00}Wiadmość do: {63AFF0}%s [ID:%i].", Player_Info[IDGracza][Player_Username], IDGracza);
  2212.     SendClientMessage(playerid, -1, Format_0);
  2213.     format(Format_0, sizeof(Format_0), "{FFFF00}Treść: {63AFF0}%s.", Wiadomosc);
  2214.     SendClientMessage(playerid, -1, Format_0);
  2215.  
  2216.     format(Format_1, sizeof(Format_1), "{FFFF00}Wiadmość od: {63AFF0}%s [ID:%i].", Player_Info[playerid][Player_Username], playerid);
  2217.     SendClientMessage(IDGracza, -1, Format_1);
  2218.     format(Format_1, sizeof(Format_1), "{FFFF00}Treść: {63AFF0}%s.", Wiadomosc);
  2219.     SendClientMessage(IDGracza, -1, Format_1);
  2220.     return 1;
  2221. }
  2222.  
  2223. CMD:skin(playerid, cmdtext[]) {
  2224.     new Skin;
  2225.     new Format0[128];
  2226.  
  2227.     if(sscanf(cmdtext, "d", Skin)) {
  2228.         return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Skin [ID].", "Zamknij", "");
  2229.     }
  2230.  
  2231.     if(Skin < 0 || Skin > 311) {
  2232.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Podany skin jest niepoprawny lub zablokowany!");
  2233.     }
  2234.  
  2235.     SetPlayerSkin(playerid, Skin);
  2236.  
  2237.     Player_Info[playerid][Player_Skin] = GetPlayerSkin(playerid);
  2238.  
  2239.     format(Format0, sizeof(Format0), "{FF9900}Zmieniłeś swój skin na {FFFF00}%d{FF9900}!", Skin);
  2240.     SendClientMessage(playerid, -1, Format0);
  2241.     return 1;
  2242. }
  2243.  
  2244. CMD:napraw(playerid) {
  2245.     if(Player_Info[playerid][Player_Money] < 2500) {
  2246.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Masz za mało pieniędzy na naprawe! Potrzebujesz 2.500$.");
  2247.     }
  2248.  
  2249.     if(IsPlayerInAnyVehicle(playerid) == 0) {
  2250.        return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Musisz być w pojeździe!");
  2251.     }
  2252.  
  2253.     if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) {
  2254.         return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Musisz być w kierowcą!");
  2255.     }
  2256.  
  2257.     RepairVehicle(GetPlayerVehicleID(playerid));
  2258.     SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
  2259.  
  2260.     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  2261.  
  2262.     Player_Info[playerid][Player_Money] -= 2500;
  2263.     SendClientMessage(playerid, -1, "{C2C2C2}Naprawiłeś pojazd za {9955DE}2.500${C2C2C2}!");
  2264.     return 1;
  2265. }
  2266.  
  2267. CMD:naj(playerid) {
  2268.     new Format_0[384];
  2269.  
  2270.     if(GetTickCount() < Command_Info[playerid][Command_Naj]) {
  2271.         new Format_1[256];
  2272.        
  2273.         format(Format_1, sizeof(Format_1), "{00EEAD}Tej komendy można użyć dopiero za {FFFF00}%d {00EEAD}sekund!", Command_Info[playerid][Command_Naj] - GetTickCount() / 1000 + 1);
  2274.         return SendClientMessage(playerid, -1, Format_1);
  2275.     }
  2276.  
  2277.     Player_Info[playerid][Player_Score] += 10;
  2278.     Player_Info[playerid][Player_Money] += 30000;
  2279.  
  2280.     Command_Info[playerid][Command_Naj] = 180000;
  2281.  
  2282.     format(Format_0, sizeof(Format_0), "{B87333}Gracz {FFFF00}%s [ID:%i] {B87333}uważa, że {FFFFFF}Polski {FF0000}Mega {66CC33}Serwer {B87333}jest najlepszy!", Player_Info[playerid][Player_Username], playerid);
  2283.     SendClientMessageToAll(-1, Format_0);
  2284.     SendClientMessage(playerid, -1, "{FFFFFF}(i) {FF9900}Dostałeś dodatkowe {FFFF00}10 EXP'a {FF9900}oraz {FFFF00}30.000${FF9900}.");
  2285.     return 1;
  2286. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement