Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Copyright (C) 2019 Zielakless
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
- //--------------------------------------------------------------------------//
- // COLOR //
- //--------------------------------------------------------------------------//
- //Gray - #C2C2C2
- //Red - #FF0000
- //Raspberry - #C5345B
- //Orange - #FF9900
- //Light Orange - #F7A26F
- //Yellow - #FFFF00
- //Light Yellow - #FFFFAA
- //Dirty Yellow - #B2B285
- //Green - #66CC33
- //Light Green - #91E567
- //Emerald - #00EEAD
- //Turquoise - #67D1B0
- //Blue - #63AFF0
- //Light Blue - #01FCFF
- //Purple - #9955DE
- //Dirty Purple - #A6A3C5
- //Brown - #B87333
- //--------------------------------------------------------------------------//
- // INCLUDE //
- //--------------------------------------------------------------------------//
- #include a_samp
- #include foreach
- #include md5
- #include mysql
- #include pawncmd
- #include sky
- #include sscanf
- #include streamer
- #include weapon-config
- //--------------------------------------------------------------------------//
- // DEFINE //
- //--------------------------------------------------------------------------//
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 20
- #define AUTHOR "Zielakless"
- #define VERSION "1.0"
- #define UPDATE "10.06.2019"
- #define MYSQL_HOSTNAME "127.0.0.1"
- #define MYSQL_USERNAME "server_113"
- #define MYSQL_PASSWORD "szkoda"
- #define MYSQL_DATABASE "server_113_Zielakless"
- //--------------------------------------------------------------------------//
- // DIALOG //
- //--------------------------------------------------------------------------//
- #define DIALOG_NOTHING 0
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_ADMIN_PASSWORD 3
- #define DIALOG_ADMIN_LOGIN 4
- //--------------------------------------------------------------------------//
- // ENUM //
- //--------------------------------------------------------------------------//
- enum Player_Infos {
- bool:Player_Logged,
- bool:Player_Is_Admin,
- bool:Player_Away,
- Player_Unique_ID,
- Player_Username[MAX_PLAYER_NAME],
- Player_Score,
- Player_Money,
- Player_Admin,
- Player_Kills,
- Player_Deaths,
- Player_Killstreak,
- Player_Skin,
- Player_Priv_Car,
- Player_On_Arena,
- Player_Bags,
- Player_Online_Time,
- Player_IP[64],
- Player_GPCI[64],
- Text3D:Player_Label
- };
- enum Command_Infos {
- Command_Naj,
- Command_Zw
- };
- enum Priv_Car_Infos {
- Priv_Car_Model,
- Priv_Car_Main_Color,
- Priv_Car_Primary_Color,
- Priv_Car_Paintjob,
- Priv_Car_Fuel_Type,
- Float:Priv_Car_Fuel,
- Float:Priv_Car_Mileage,
- Float:Priv_Car_Parking_X,
- Float:Priv_Car_Parking_Y,
- Float:Priv_Car_Parking_Z,
- Float:Priv_Car_Parking_A,
- Text3D:Priv_Car_Label
- };
- enum Bag_Infos
- {
- bool:Bag_Placed,
- Float:Bag_PosX,
- Float:Bag_PosY,
- Float:Bag_PosZ,
- Bag_Pickup,
- Bag_Score,
- Bag_Money
- };
- //--------------------------------------------------------------------------//
- // VARIABLE //
- //--------------------------------------------------------------------------//
- new PlayerText:TextDraw_LicznikInformacje[MAX_PLAYERS][5];
- new PlayerText:TextDraw_Nick[MAX_PLAYERS];
- new PlayerText:TextDraw_Statystyki[MAX_PLAYERS];
- new Text:TextDraw_Godzina;
- new Text:TextDraw_Data;
- new Text:TextDraw_Zabawy[2];
- new Text:TextDraw_Walizka[4];
- new Text:TextDraw_LicznikBox[2];
- new Text:TextDraw_StatystykiBox[2];
- new Text:TextDraw_Gracze;
- new Text:TextDraw_Areny;
- new Text:TextDraw_Nazwa;
- new Text:TextDraw_Strona;
- new Player_Info[MAX_PLAYERS][Player_Infos];
- new Command_Info[MAX_PLAYERS][Command_Infos];
- new Priv_Car_Info[MAX_PLAYERS][Priv_Car_Infos];
- new Bag_Info[Bag_Infos];
- new bool:Vehicle_Is_Server[MAX_VEHICLES];
- new bool:Vehicle_Is_Public[MAX_VEHICLES];
- new bool:Vehicle_Is_Private[MAX_VEHICLES];
- new Float:FreeroamSpawnList[][] = {
- {2256.7126, -37.3747, 26.4844},
- {2718.2590, -2397.6870, 13.6328},
- {2778.6646, -2003.0597, 13.5547},
- {2726.2253, 735.2389, 10.8984},
- {-2532.0742, -609.8701, 132.5625},
- {1717.4056, -2681.3687, 13.5469},
- {1673.4735, -1323.7244, 17.4306},
- {2080.9983, 1588.7236, 10.8203},
- {-1833.5326, 574.6578, 234.8874},
- {2059.8332, 163.6176, 470.4751},
- {2584.9539, -2199.3391, -0.2188},
- {811.0493, -1905.3453, 2343.6125},
- {2339.4807, -3256.7822, 12.9609},
- {1943.9916, -3.9042, 137.2063}
- };
- new ColorList[] = {
- 0xFF8C13FF,
- 0xC715FFFF,
- 0x20B2AAFF,
- 0xDC143CFF,
- 0x6495EDFF,
- 0xf0e68cFF,
- 0x778899FF,
- 0xFF1493FF,
- 0xF4A460FF,
- 0xEE82EEFF,
- 0xFFD720FF,
- 0x8b4513FF,
- 0x4949A0FF,
- 0x148b8bFF,
- 0x14ff7fFF,
- 0x556b2fFF,
- 0x6FD9FAFF,
- 0x10DC29FF,
- 0x534081FF,
- 0x5495CDFF,
- 0xEF6CE8FF,
- 0xBD34DAFF,
- 0x247C1BFF,
- 0x4C8E5DFF,
- 0x635B03FF,
- 0xCB7ED3FF,
- 0x65ADEBFF,
- 0x5C1ACCFF,
- 0xF2F853FF,
- 0x11F891FF,
- 0x7B39AAFF,
- 0x53EB10FF,
- 0x54137DFF,
- 0x275222FF,
- 0xF09F5BFF,
- 0x3D0A4FFF,
- 0x22F767FF,
- 0xD63034FF,
- 0x9A6980FF,
- 0xDFB935FF,
- 0x3793FAFF,
- 0x90239DFF,
- 0xE9AB2FFF,
- 0xAF2FF3FF,
- 0x757F94FF,
- 0xB98519FF,
- 0x388EEAFF,
- 0x928151FF,
- 0xA55043FF,
- 0x3DE018FF,
- 0x93AB1CFF,
- 0x95BAF0FF,
- 0x369976FF,
- 0x18F71FFF,
- 0x4B8987FF,
- 0x491B9EFF,
- 0x829DC7FF,
- 0xBCE635FF,
- 0xCEA6DFFF,
- 0x20D4ADFF,
- 0x2D74FDFF,
- 0x3C1C0DFF,
- 0x12D6D4FF,
- 0x48C000FF,
- 0x2A51E2FF,
- 0xE3AC12FF,
- 0xFC42A8FF,
- 0x2FC827FF,
- 0x1A30BFFF,
- 0xB740C2FF,
- 0x42ACF5FF,
- 0x2FD9DEFF,
- 0xFAFB71FF,
- 0x55D1CDFF,
- 0xC471BDFF,
- 0x94436EFF,
- 0xC1F7ECFF,
- 0xCE79EEFF,
- 0xBD1EF2FF,
- 0x93B7E4FF,
- 0x3214AAFF,
- 0x184D3BFF,
- 0xAE4B99FF,
- 0x7E49D7FF,
- 0x4C436EFF,
- 0xFA24CCFF,
- 0xCE76BEFF,
- 0xA04E0AFF,
- 0x9F945CFF,
- 0xDCDE3DFF,
- 0x10C9C5FF,
- 0x70524DFF,
- 0x8BE472FF,
- 0x8A2CD7FF,
- 0x6152C2FF,
- 0xCF72A9FF,
- 0xE59338FF,
- 0xEEDC2DFF,
- 0xD8C762FF,
- 0xD8C762FF,
- 0xFF8C13FF,
- 0xC715FFFF,
- 0x20B2AAFF,
- 0xDC143CFF,
- 0x6495EDFF,
- 0xf0e68cFF,
- 0x778899FF,
- 0xFF1493FF,
- 0xF4A460FF,
- 0xEE82EEFF,
- 0xFFD720FF,
- 0x8b4513FF,
- 0x4949A0FF,
- 0x148b8bFF,
- 0x14ff7fFF,
- 0x556b2fFF,
- 0xBFD9FAFF,
- 0x10DC29FF,
- 0x534081FF,
- 0xE495CDFF,
- 0xEF6CE8FF,
- 0xBD34DAFF,
- 0x247C1BFF,
- 0xAC8E5DFF,
- 0x635B03FF,
- 0xCB7ED3FF,
- 0x65ADEBFF,
- 0x5C1ACCFF,
- 0xF2F853FF,
- 0x11F891FF,
- 0x7B39AAFF,
- 0x53EB10FF,
- 0x54137DFF,
- 0x275222FF,
- 0xF09F5BFF,
- 0x3D0A4FFF,
- 0x22F767FF,
- 0xD63034FF,
- 0x9A6980FF,
- 0xDFB935FF,
- 0x3793FAFF,
- 0x90239DFF,
- 0xE9AB2FFF,
- 0xAF2FF3FF,
- 0xF57F94FF,
- 0xB98519FF,
- 0x388EEAFF,
- 0xE28151FF,
- 0xA55043FF,
- 0xFDE018FF,
- 0x93AB1CFF,
- 0x95BAF0FF,
- 0x369976FF,
- 0x18F71FFF,
- 0x4B8987FF,
- 0x491B9EFF,
- 0x829DC7FF,
- 0xBCE635FF,
- 0xCEA6DFFF,
- 0x20D4ADFF,
- 0x2D74FDFF,
- 0x3C1C0DFF,
- 0x12D6D4FF,
- 0x48C000FF,
- 0x2A51E2FF,
- 0xE3AC12FF,
- 0xFC42A8FF,
- 0x2FC827FF,
- 0x1A30BFFF,
- 0xB740C2FF,
- 0x42ACF5FF,
- 0x2FD9DEFF,
- 0xFAFB71FF,
- 0xA5D1CDFF,
- 0xC471BDFF,
- 0x94436EFF,
- 0xC1F7ECFF,
- 0xCE79EEFF,
- 0xBD1EF2FF,
- 0x93B7E4FF,
- 0x3214AAFF,
- 0x184D3BFF,
- 0xAE4B99FF,
- 0x7E49D7FF,
- 0x4C436EFF,
- 0xFA24CCFF,
- 0xCE76BEFF,
- 0xA04E0AFF,
- 0x9F945CFF,
- 0xDCDE3DFF,
- 0x10C9C5FF,
- 0x70524DFF,
- 0xFBE472FF,
- 0x8A2CD7FF,
- 0x6152C2FF,
- 0xCF72A9FF,
- 0xE59338FF,
- 0xEEDC2DFF,
- 0xD8C762FF,
- 0xD8C762FF
- };
- new VehicleList[][] = {
- {"Landstalker"},
- {"Bravura"},
- {"Buffalo"},
- {"Linerunner"},
- {"Perenail"},
- {"Sentinel"},
- {"Dumper"},
- {"Firetruck"},
- {"Trashmaster"},
- {"Stretch"},
- {"Manana"},
- {"Infernus"},
- {"Voodoo"},
- {"Pony"},
- {"Mule"},
- {"Cheetah"},
- {"Ambulance"},
- {"Levetian"},
- {"Moonbeam"},
- {"Esperanto"},
- {"Taxi"},
- {"Washington"},
- {"Bobcat"},
- {"Mr Whoopee"},
- {"BF Injection"},
- {"Hunter"},
- {"Premier"},
- {"Enforcer"},
- {"Securicar"},
- {"Banshee"},
- {"Predator"},
- {"Bus"},
- {"Rhino"},
- {"Barracks"},
- {"Hotknife"},
- {"Artic Trailer 1"},
- {"Previon"},
- {"Coach"},
- {"Cabbie"},
- {"Stallion"},
- {"Rumpo"},
- {"RC Bandit"},
- {"Romero"},
- {"Packer"},
- {"Monster"},
- {"Admiral"},
- {"Squalo"},
- {"Seasparrow"},
- {"Pizza Boy"},
- {"Tram"},
- {"Artic Trailer 2"},
- {"Turismo"},
- {"Speeder"},
- {"Reefer"},
- {"Tropic"},
- {"Flatbed"},
- {"Yankee"},
- {"Caddy"},
- {"Solair"},
- {"Top Fun"},
- {"Skimmer"},
- {"PCJ-600"},
- {"Faggio"},
- {"Freeway"},
- {"RC Baron"},
- {"RC Raider"},
- {"Glendale"},
- {"Oceanic"},
- {"Sanchez"},
- {"Sparrow"},
- {"Patriot"},
- {"Quad"},
- {"Coastguard"},
- {"Dinghy"},
- {"Hermes"},
- {"Sabre"},
- {"Rustler"},
- {"ZR-350"},
- {"Walton"},
- {"Regina"},
- {"Comet"},
- {"BMX"},
- {"Burrito"},
- {"Camper"},
- {"Marquis"},
- {"Baggage"},
- {"Dozer"},
- {"Maverick"},
- {"SAN Maverick"},
- {"Rancher"},
- {"FBI Rancher"},
- {"Virgo"},
- {"Greenwood"},
- {"Jetmax"},
- {"Hotring"},
- {"Sandking"},
- {"Blista Compact"},
- {"Police Maverick"},
- {"Boxville"},
- {"Benson"},
- {"Mesa"},
- {"RC Goblin"},
- {"Hotring A"},
- {"Hotring B"},
- {"Bloodring Banger"},
- {"Rancher (Lure)"},
- {"Super GT"},
- {"Elegant"},
- {"Journey"},
- {"Bike"},
- {"Mountain Bike"},
- {"Beagle"},
- {"Cropduster"},
- {"Stuntplane"},
- {"Petrol"},
- {"Roadtrain"},
- {"Nebula"},
- {"Majestic"},
- {"Buccaneer"},
- {"Shamal"},
- {"Hydra"},
- {"FCR-900"},
- {"NRG-500"},
- {"HPV-1000"},
- {"Cement Truck"},
- {"Tow Truck"},
- {"Fortune"},
- {"Cadrona"},
- {"FBI Truck"},
- {"Willard"},
- {"Forklift"},
- {"Tractor"},
- {"Combine"},
- {"Feltzer"},
- {"Remington"},
- {"Slamvan"},
- {"Blade"},
- {"Freight"},
- {"Streak"},
- {"Vortex"},
- {"Vincent"},
- {"Bullet"},
- {"Clover"},
- {"Sadler"},
- {"Firetruck LS"},
- {"Hustler"},
- {"Intruder"},
- {"Primo"},
- {"Cargobob"},
- {"Tampa"},
- {"Sunrise"},
- {"Merit"},
- {"Utility Van"},
- {"Nevada"},
- {"Yosemite"},
- {"Windsor"},
- {"Monster A"},
- {"Monster B"},
- {"Uranus"},
- {"Jester"},
- {"Sultan"},
- {"Stratum"},
- {"Elegy"},
- {"Raindance"},
- {"RC Tiger"},
- {"Flash"},
- {"Tahoma"},
- {"Savanna"},
- {"Bandito"},
- {"Freight Flat"},
- {"Streak Trailer"},
- {"Kart"},
- {"Mower"},
- {"Duneride"},
- {"Sweeper"},
- {"Broadway"},
- {"Tornado"},
- {"AT-400"},
- {"DFT-30"},
- {"Huntley"},
- {"Stafford"},
- {"BF-400"},
- {"News Van"},
- {"Tug"},
- {"Petrol Tanker"},
- {"Emperor"},
- {"Wayfarer"},
- {"Euros"},
- {"Hotdog"},
- {"Club"},
- {"Freight Box"},
- {"Artic Trailer"},
- {"Andromada"},
- {"Dodo"},
- {"RC Cam"},
- {"Launch"},
- {"Cop Car LS"},
- {"Cop Car SF"},
- {"Cop Car LV"},
- {"Ranger"},
- {"Picador"},
- {"Swat Tank"},
- {"Alpha"},
- {"Phoenix"},
- {"Glendale (damaged)"},
- {"Sadler (damaged)"},
- {"Bag Box A"},
- {"Bag Box B"},
- {"Stairs"},
- {"Boxville (black)"},
- {"Farm Trailer"},
- {"Utility Trailer"}
- };
- main() {
- return 1;
- }
- //--------------------------------------------------------------------------//
- // CALLBACK //
- //--------------------------------------------------------------------------//
- public OnGameModeInit() {
- mysql_init();
- mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE);
- UsePlayerPedAnims();
- EnableStuntBonusForAll(0);
- DisableInteriorEnterExits();
- for(new i = 0; i < MAX_PLAYERS; i += 1) {
- Player_Info[i][Player_Label] = Create3DTextLabel(" ", 0xFFFFFFFF, 200.0, 40.0, 50.0, 40.0, 0);
- }
- for(new i = 0; i < MAX_VEHICLES; i += 1) {
- Vehicle_Is_Server[i] = true;
- Vehicle_Is_Public[i] = false;
- Vehicle_Is_Private[i] = false;
- }
- TextDraw_Godzina = TextDrawCreate(580.000000, 19.000000, "23:59");
- TextDrawFont(TextDraw_Godzina, 3);
- TextDrawLetterSize(TextDraw_Godzina, 0.600000, 2.000000);
- TextDrawTextSize(TextDraw_Godzina, 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Godzina, 1);
- TextDrawSetShadow(TextDraw_Godzina, 0);
- TextDrawAlignment(TextDraw_Godzina, 2);
- TextDrawColor(TextDraw_Godzina, -1);
- TextDrawBackgroundColor(TextDraw_Godzina, 255);
- TextDrawBoxColor(TextDraw_Godzina, 50);
- TextDrawUseBox(TextDraw_Godzina, 0);
- TextDrawSetProportional(TextDraw_Godzina, 1);
- TextDrawSetSelectable(TextDraw_Godzina, 0);
- TextDraw_Data = TextDrawCreate(580.000000, 37.000000, "01.01.2019");
- TextDrawFont(TextDraw_Data, 3);
- TextDrawLetterSize(TextDraw_Data, 0.316666, 1.049998);
- TextDrawTextSize(TextDraw_Data, 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Data, 1);
- TextDrawSetShadow(TextDraw_Data, 0);
- TextDrawAlignment(TextDraw_Data, 2);
- TextDrawColor(TextDraw_Data, -1);
- TextDrawBackgroundColor(TextDraw_Data, 255);
- TextDrawBoxColor(TextDraw_Data, 50);
- TextDrawUseBox(TextDraw_Data, 0);
- TextDrawSetProportional(TextDraw_Data, 1);
- TextDrawSetSelectable(TextDraw_Data, 0);
- 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");
- TextDrawFont(TextDraw_Zabawy[0], 2);
- TextDrawLetterSize(TextDraw_Zabawy[0], 0.180000, 0.899999);
- TextDrawTextSize(TextDraw_Zabawy[0], 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Zabawy[0], 1);
- TextDrawSetShadow(TextDraw_Zabawy[0], 0);
- TextDrawAlignment(TextDraw_Zabawy[0], 1);
- TextDrawColor(TextDraw_Zabawy[0], 10543359);
- TextDrawBackgroundColor(TextDraw_Zabawy[0], 255);
- TextDrawBoxColor(TextDraw_Zabawy[0], 50);
- TextDrawUseBox(TextDraw_Zabawy[0], 0);
- TextDrawSetProportional(TextDraw_Zabawy[0], 1);
- TextDrawSetSelectable(TextDraw_Zabawy[0], 0);
- 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");
- TextDrawFont(TextDraw_Zabawy[1], 2);
- TextDrawLetterSize(TextDraw_Zabawy[1], 0.200000, 0.899999);
- TextDrawTextSize(TextDraw_Zabawy[1], 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Zabawy[1], 1);
- TextDrawSetShadow(TextDraw_Zabawy[1], 0);
- TextDrawAlignment(TextDraw_Zabawy[1], 1);
- TextDrawColor(TextDraw_Zabawy[1], -1);
- TextDrawBackgroundColor(TextDraw_Zabawy[1], 255);
- TextDrawBoxColor(TextDraw_Zabawy[1], 50);
- TextDrawUseBox(TextDraw_Zabawy[1], 0);
- TextDrawSetProportional(TextDraw_Zabawy[1], 1);
- TextDrawSetSelectable(TextDraw_Zabawy[1], 0);
- TextDraw_Walizka[0] = TextDrawCreate(580.000000, 349.000000, "_");
- TextDrawFont(TextDraw_Walizka[0], 1);
- TextDrawLetterSize(TextDraw_Walizka[0], 0.600000, 0.000000);
- TextDrawTextSize(TextDraw_Walizka[0], 298.500000, 105.000000);
- TextDrawSetOutline(TextDraw_Walizka[0], 1);
- TextDrawSetShadow(TextDraw_Walizka[0], 0);
- TextDrawAlignment(TextDraw_Walizka[0], 2);
- TextDrawColor(TextDraw_Walizka[0], -1);
- TextDrawBackgroundColor(TextDraw_Walizka[0], 255);
- TextDrawBoxColor(TextDraw_Walizka[0], -65401);
- TextDrawUseBox(TextDraw_Walizka[0], 1);
- TextDrawSetProportional(TextDraw_Walizka[0], 1);
- TextDrawSetSelectable(TextDraw_Walizka[0], 0);
- TextDraw_Walizka[1] = TextDrawCreate(580.000000, 353.000000, "_");
- TextDrawFont(TextDraw_Walizka[1], 1);
- TextDrawLetterSize(TextDraw_Walizka[1], 0.600000, 4.399999);
- TextDrawTextSize(TextDraw_Walizka[1], 298.500000, 105.000000);
- TextDrawSetOutline(TextDraw_Walizka[1], 1);
- TextDrawSetShadow(TextDraw_Walizka[1], 0);
- TextDrawAlignment(TextDraw_Walizka[1], 2);
- TextDrawColor(TextDraw_Walizka[1], -1);
- TextDrawBackgroundColor(TextDraw_Walizka[1], 255);
- TextDrawBoxColor(TextDraw_Walizka[1], 135);
- TextDrawUseBox(TextDraw_Walizka[1], 1);
- TextDrawSetProportional(TextDraw_Walizka[1], 1);
- TextDrawSetSelectable(TextDraw_Walizka[1], 0);
- TextDraw_Walizka[2] = TextDrawCreate(627.000000, 353.000000, "] WALIZKA ]");
- TextDrawFont(TextDraw_Walizka[2], 2);
- TextDrawLetterSize(TextDraw_Walizka[2], 0.345833, 1.049998);
- TextDrawTextSize(TextDraw_Walizka[2], 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Walizka[2], 1);
- TextDrawSetShadow(TextDraw_Walizka[2], 0);
- TextDrawAlignment(TextDraw_Walizka[2], 3);
- TextDrawColor(TextDraw_Walizka[2], -2686721);
- TextDrawBackgroundColor(TextDraw_Walizka[2], 255);
- TextDrawBoxColor(TextDraw_Walizka[2], 50);
- TextDrawUseBox(TextDraw_Walizka[2], 0);
- TextDrawSetProportional(TextDraw_Walizka[2], 1);
- TextDrawSetSelectable(TextDraw_Walizka[2], 0);
- TextDraw_Walizka[3] = TextDrawCreate(531.000000, 364.000000, "Podpowiedz:~n~> Niedaleko /Plaza");
- TextDrawFont(TextDraw_Walizka[3], 1);
- TextDrawLetterSize(TextDraw_Walizka[3], 0.237498, 0.750000);
- TextDrawTextSize(TextDraw_Walizka[3], 990.500000, 489.500000);
- TextDrawSetOutline(TextDraw_Walizka[3], 1);
- TextDrawSetShadow(TextDraw_Walizka[3], 0);
- TextDrawAlignment(TextDraw_Walizka[3], 1);
- TextDrawColor(TextDraw_Walizka[3], -1);
- TextDrawBackgroundColor(TextDraw_Walizka[3], 255);
- TextDrawBoxColor(TextDraw_Walizka[3], 50);
- TextDrawUseBox(TextDraw_Walizka[3], 0);
- TextDrawSetProportional(TextDraw_Walizka[3], 1);
- TextDrawSetSelectable(TextDraw_Walizka[3], 0);
- TextDraw_LicznikBox[0] = TextDrawCreate(320.000000, 349.000000, "_");
- TextDrawFont(TextDraw_LicznikBox[0], 1);
- TextDrawLetterSize(TextDraw_LicznikBox[0], 0.600000, 0.000000);
- TextDrawTextSize(TextDraw_LicznikBox[0], 298.500000, 191.500000);
- TextDrawSetOutline(TextDraw_LicznikBox[0], 1);
- TextDrawSetShadow(TextDraw_LicznikBox[0], 0);
- TextDrawAlignment(TextDraw_LicznikBox[0], 2);
- TextDrawColor(TextDraw_LicznikBox[0], -1);
- TextDrawBackgroundColor(TextDraw_LicznikBox[0], 255);
- TextDrawBoxColor(TextDraw_LicznikBox[0], 9109639);
- TextDrawUseBox(TextDraw_LicznikBox[0], 1);
- TextDrawSetProportional(TextDraw_LicznikBox[0], 1);
- TextDrawSetSelectable(TextDraw_LicznikBox[0], 0);
- TextDraw_LicznikBox[1] = TextDrawCreate(320.000000, 352.000000, "_");
- TextDrawFont(TextDraw_LicznikBox[1], 1);
- TextDrawLetterSize(TextDraw_LicznikBox[1], 0.600000, 5.349998);
- TextDrawTextSize(TextDraw_LicznikBox[1], 303.500000, 191.500000);
- TextDrawSetOutline(TextDraw_LicznikBox[1], 1);
- TextDrawSetShadow(TextDraw_LicznikBox[1], 0);
- TextDrawAlignment(TextDraw_LicznikBox[1], 2);
- TextDrawColor(TextDraw_LicznikBox[1], -1);
- TextDrawBackgroundColor(TextDraw_LicznikBox[1], 255);
- TextDrawBoxColor(TextDraw_LicznikBox[1], 135);
- TextDrawUseBox(TextDraw_LicznikBox[1], 1);
- TextDrawSetProportional(TextDraw_LicznikBox[1], 1);
- TextDrawSetSelectable(TextDraw_LicznikBox[1], 0);
- TextDraw_StatystykiBox[0] = TextDrawCreate(320.000000, 427.000000, "_");
- TextDrawFont(TextDraw_StatystykiBox[0], 1);
- TextDrawLetterSize(TextDraw_StatystykiBox[0], 0.600000, 0.000000);
- TextDrawTextSize(TextDraw_StatystykiBox[0], 298.500000, 636.000000);
- TextDrawSetOutline(TextDraw_StatystykiBox[0], 1);
- TextDrawSetShadow(TextDraw_StatystykiBox[0], 0);
- TextDrawAlignment(TextDraw_StatystykiBox[0], 2);
- TextDrawColor(TextDraw_StatystykiBox[0], -1);
- TextDrawBackgroundColor(TextDraw_StatystykiBox[0], 255);
- TextDrawBoxColor(TextDraw_StatystykiBox[0], 9109639);
- TextDrawUseBox(TextDraw_StatystykiBox[0], 1);
- TextDrawSetProportional(TextDraw_StatystykiBox[0], 1);
- TextDrawSetSelectable(TextDraw_StatystykiBox[0], 0);
- TextDraw_StatystykiBox[1] = TextDrawCreate(320.000000, 430.000000, "_");
- TextDrawFont(TextDraw_StatystykiBox[1], 1);
- TextDrawLetterSize(TextDraw_StatystykiBox[1], 0.600000, 1.799991);
- TextDrawTextSize(TextDraw_StatystykiBox[1], 302.500000, 636.500000);
- TextDrawSetOutline(TextDraw_StatystykiBox[1], 1);
- TextDrawSetShadow(TextDraw_StatystykiBox[1], 0);
- TextDrawAlignment(TextDraw_StatystykiBox[1], 2);
- TextDrawColor(TextDraw_StatystykiBox[1], -1);
- TextDrawBackgroundColor(TextDraw_StatystykiBox[1], 255);
- TextDrawBoxColor(TextDraw_StatystykiBox[1], 135);
- TextDrawUseBox(TextDraw_StatystykiBox[1], 1);
- TextDrawSetProportional(TextDraw_StatystykiBox[1], 1);
- TextDrawSetSelectable(TextDraw_StatystykiBox[1], 0);
- TextDraw_Gracze = TextDrawCreate(8.000000, 431.000000, "(~y~0~w~/~b~0~w~/~r~0~w~)");
- TextDrawFont(TextDraw_Gracze, 1);
- TextDrawLetterSize(TextDraw_Gracze, 0.291666, 1.200000);
- TextDrawTextSize(TextDraw_Gracze, 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Gracze, 1);
- TextDrawSetShadow(TextDraw_Gracze, 0);
- TextDrawAlignment(TextDraw_Gracze, 1);
- TextDrawColor(TextDraw_Gracze, -1);
- TextDrawBackgroundColor(TextDraw_Gracze, 255);
- TextDrawBoxColor(TextDraw_Gracze, 50);
- TextDrawUseBox(TextDraw_Gracze, 0);
- TextDrawSetProportional(TextDraw_Gracze, 1);
- TextDrawSetSelectable(TextDraw_Gracze, 0);
- TextDraw_Areny = TextDrawCreate(634.000000, 433.000000, "/onede (0) /arena (0) /sniper (0) /pump (0)");
- TextDrawFont(TextDraw_Areny, 2);
- TextDrawLetterSize(TextDraw_Areny, 0.145833, 1.000000);
- TextDrawTextSize(TextDraw_Areny, 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Areny, 1);
- TextDrawSetShadow(TextDraw_Areny, 0);
- TextDrawAlignment(TextDraw_Areny, 3);
- TextDrawColor(TextDraw_Areny, -1094795521);
- TextDrawBackgroundColor(TextDraw_Areny, 255);
- TextDrawBoxColor(TextDraw_Areny, 50);
- TextDrawUseBox(TextDraw_Areny, 0);
- TextDrawSetProportional(TextDraw_Areny, 1);
- TextDrawSetSelectable(TextDraw_Areny, 0);
- TextDraw_Nazwa = TextDrawCreate(580.000000, 396.000000, "Polski ~r~Mega ~g~Serwer");
- TextDrawFont(TextDraw_Nazwa, 0);
- TextDrawLetterSize(TextDraw_Nazwa, 0.420832, 1.799998);
- TextDrawTextSize(TextDraw_Nazwa, 400.000000, 192.000000);
- TextDrawSetOutline(TextDraw_Nazwa, 1);
- TextDrawSetShadow(TextDraw_Nazwa, 0);
- TextDrawAlignment(TextDraw_Nazwa, 2);
- TextDrawColor(TextDraw_Nazwa, -1);
- TextDrawBackgroundColor(TextDraw_Nazwa, 255);
- TextDrawBoxColor(TextDraw_Nazwa, 50);
- TextDrawUseBox(TextDraw_Nazwa, 0);
- TextDrawSetProportional(TextDraw_Nazwa, 1);
- TextDrawSetSelectable(TextDraw_Nazwa, 0);
- TextDraw_Strona = TextDrawCreate(580.000000, 412.000000, "www.serwer-pms.ct8.pl");
- TextDrawFont(TextDraw_Strona, 1);
- TextDrawLetterSize(TextDraw_Strona, 0.283333, 1.250000);
- TextDrawTextSize(TextDraw_Strona, 400.000000, 17.000000);
- TextDrawSetOutline(TextDraw_Strona, 1);
- TextDrawSetShadow(TextDraw_Strona, 0);
- TextDrawAlignment(TextDraw_Strona, 2);
- TextDrawColor(TextDraw_Strona, -1);
- TextDrawBackgroundColor(TextDraw_Strona, 255);
- TextDrawBoxColor(TextDraw_Strona, 50);
- TextDrawUseBox(TextDraw_Strona, 0);
- TextDrawSetProportional(TextDraw_Strona, 1);
- TextDrawSetSelectable(TextDraw_Strona, 0);
- Bag_Info[Bag_Placed] = false;
- Bag_Info[Bag_Score] = 0;
- Bag_Info[Bag_Money] = 0;
- SetTimer("OnShowAdvert", 600000, 1);
- SetTimer("OnUpdatePlayer", 1000, 1);
- SendRconCommand("hostname [Ultra-H.com] ‹‹ •-•-• Polski Mega Serwer [DM] •-•-• ››");
- SendRconCommand("gamemodetext Polski|DM|FR|FUN|PL|");
- SendRconCommand("language PL Polski Polish");
- SendRconCommand("mapname •PMS "#VERSION" PL•");
- SendRconCommand("weburl www.serwer-pms.ct8.pl");
- return 1;
- }
- public OnPlayerConnect(playerid) {
- new Query_0[384];
- new Format_0[256];
- new Strcat_0[256];
- for(new i = 0; i <= 100; i += 1) {
- SendClientMessage(playerid, -1, "");
- }
- GetPlayerName(playerid, Player_Info[playerid][Player_Username], MAX_PLAYER_NAME);
- GetPlayerIp(playerid, Player_Info[playerid][Player_IP], 64);
- gpci(playerid, Player_Info[playerid][Player_GPCI], 64);
- LoadBan(playerid);
- SetPlayerRandomColor(playerid);
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, " ");
- Attach3DTextLabelToPlayer(Player_Info[playerid][Player_Label], playerid, 0.0, 0.0, 0.7);
- format(Query_0, sizeof(Query_0), "SELECT `Username` FROM `Players` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
- mysql_query(Query_0);
- mysql_store_result();
- if(!mysql_num_rows()) {
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
- strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
- strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
- }
- else {
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
- }
- mysql_free_result();
- TextDraw_LicznikInformacje[playerid][0] = CreatePlayerTextDraw(playerid, 217.000000, 317.000000, "Preview_Model");
- PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][0], 5);
- PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][0], 0.600000, 2.000000);
- PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][0], 109.000000, 107.500000);
- PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
- PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][0], 2);
- PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][0], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
- PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][0], 255);
- PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][0], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][0], 0);
- PlayerTextDrawSetPreviewModel(playerid, TextDraw_LicznikInformacje[playerid][0], 411);
- PlayerTextDrawSetPreviewRot(playerid, TextDraw_LicznikInformacje[playerid][0], -10.000000, 0.000000, -35.000000, 1.000000);
- PlayerTextDrawSetPreviewVehCol(playerid, TextDraw_LicznikInformacje[playerid][0], 1, 1);
- TextDraw_LicznikInformacje[playerid][1] = CreatePlayerTextDraw(playerid, 351.000000, 351.000000, "~y~] ~g~~h~Infernus ~y~]");
- PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][1], 2);
- PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][1], 0.304165, 1.100000);
- PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][1], 400.000000, 327.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][1], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][1], 2);
- PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][1], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][1], 255);
- PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][1], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][1], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][1], 0);
- TextDraw_LicznikInformacje[playerid][2] = CreatePlayerTextDraw(playerid, 407.000000, 368.000000, "~g~~h~Predkosc: ~y~~h~300km/h");
- PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
- PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][2], 0.241667, 0.850000);
- PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][2], 400.000000, 17.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][2], 3);
- PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][2], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][2], 255);
- PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][2], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][2], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][2], 0);
- TextDraw_LicznikInformacje[playerid][3] = CreatePlayerTextDraw(playerid, 407.000000, 376.000000, "~g~~h~Status: ~y~~h~Otwarty");
- PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
- PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][3], 0.241667, 0.850000);
- PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][3], 400.000000, 17.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][3], 3);
- PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][3], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][3], 255);
- PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][3], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][3], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][3], 0);
- TextDraw_LicznikInformacje[playerid][4] = CreatePlayerTextDraw(playerid, 407.000000, 385.000000, "~g~~h~Stan: ~y~~h~100/100");
- PlayerTextDrawFont(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
- PlayerTextDrawLetterSize(playerid, TextDraw_LicznikInformacje[playerid][4], 0.241667, 0.850000);
- PlayerTextDrawTextSize(playerid, TextDraw_LicznikInformacje[playerid][4], 400.000000, 17.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_LicznikInformacje[playerid][4], 3);
- PlayerTextDrawColor(playerid, TextDraw_LicznikInformacje[playerid][4], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_LicznikInformacje[playerid][4], 255);
- PlayerTextDrawBoxColor(playerid, TextDraw_LicznikInformacje[playerid][4], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_LicznikInformacje[playerid][4], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_LicznikInformacje[playerid][4], 0);
- TextDraw_Nick[playerid] = CreatePlayerTextDraw(playerid, 90.000000, 431.000000, "Zielakless");
- PlayerTextDrawFont(playerid, TextDraw_Nick[playerid], 1);
- PlayerTextDrawLetterSize(playerid, TextDraw_Nick[playerid], 0.320832, 1.399999);
- PlayerTextDrawTextSize(playerid, TextDraw_Nick[playerid], 400.000000, 252.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_Nick[playerid], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_Nick[playerid], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_Nick[playerid], 2);
- PlayerTextDrawColor(playerid, TextDraw_Nick[playerid], 9109759);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_Nick[playerid], 16711935);
- PlayerTextDrawBoxColor(playerid, TextDraw_Nick[playerid], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_Nick[playerid], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_Nick[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_Nick[playerid], 0);
- 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");
- PlayerTextDrawFont(playerid, TextDraw_Statystyki[playerid], 1);
- PlayerTextDrawLetterSize(playerid, TextDraw_Statystyki[playerid], 0.162499, 1.250000);
- PlayerTextDrawTextSize(playerid, TextDraw_Statystyki[playerid], 855.000000, -453.000000);
- PlayerTextDrawSetOutline(playerid, TextDraw_Statystyki[playerid], 1);
- PlayerTextDrawSetShadow(playerid, TextDraw_Statystyki[playerid], 0);
- PlayerTextDrawAlignment(playerid, TextDraw_Statystyki[playerid], 1);
- PlayerTextDrawColor(playerid, TextDraw_Statystyki[playerid], -1);
- PlayerTextDrawBackgroundColor(playerid, TextDraw_Statystyki[playerid], 255);
- PlayerTextDrawBoxColor(playerid, TextDraw_Statystyki[playerid], 50);
- PlayerTextDrawUseBox(playerid, TextDraw_Statystyki[playerid], 0);
- PlayerTextDrawSetProportional(playerid, TextDraw_Statystyki[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, TextDraw_Statystyki[playerid], 0);
- Player_Info[playerid][Player_Logged] = false;
- Player_Info[playerid][Player_Is_Admin] = false;
- Player_Info[playerid][Player_Away] = false;
- Player_Info[playerid][Player_Unique_ID] = 0;
- Player_Info[playerid][Player_Score] = 0;
- Player_Info[playerid][Player_Money] = 0;
- Player_Info[playerid][Player_Admin] = 0;
- Player_Info[playerid][Player_Kills] = 0;
- Player_Info[playerid][Player_Deaths] = 0;
- Player_Info[playerid][Player_Killstreak] = 0;
- Player_Info[playerid][Player_Skin] = 0;
- Player_Info[playerid][Player_Priv_Car] = 0;
- Player_Info[playerid][Player_On_Arena] = 0;
- Player_Info[playerid][Player_Bags] = 0;
- Player_Info[playerid][Player_Online_Time] = 0;
- Command_Info[playerid][Command_Naj] = 0;
- Command_Info[playerid][Command_Zw] = 0;
- Priv_Car_Info[playerid][Priv_Car_Model] = 0;
- Priv_Car_Info[playerid][Priv_Car_Main_Color] = 0;
- Priv_Car_Info[playerid][Priv_Car_Primary_Color] = 0;
- Priv_Car_Info[playerid][Priv_Car_Paintjob] = 4;
- Priv_Car_Info[playerid][Priv_Car_Fuel_Type] = 0;
- Priv_Car_Info[playerid][Priv_Car_Fuel] = 0;
- Priv_Car_Info[playerid][Priv_Car_Mileage] = 0;
- Priv_Car_Info[playerid][Priv_Car_Parking_X] = 0;
- Priv_Car_Info[playerid][Priv_Car_Parking_Y] = 0;
- Priv_Car_Info[playerid][Priv_Car_Parking_Z] = 0;
- Priv_Car_Info[playerid][Priv_Car_Parking_A] = 0;
- SendClientMessage(playerid, -1, "{FFFF00}*******************************************************");
- SendClientMessage(playerid, -1, "{C2C2C2}Witamy na << {FFFFFF}Polski {FF0000}Mega {66CC33}Serwer {C2C2C2}>>.");
- SendClientMessage(playerid, -1, "{66CC33}> {FF9900}Witamy na serwerze! Wszystkie komendy znajdziesz wpisując {FFFFAA}/cmd{FF9900}.");
- SendClientMessage(playerid, -1, "{66CC33}> {A6A3C5}Dołącz do gry, zdobywaj poziomy i zostań największym gangsterem na dzielnicy!");
- SendClientMessage(playerid, -1, "{66CC33}> {66CC33}Podoba Ci się serwer? Dodaj go do ulubionych! {91E567}94.23.208.199:8005{66CC33}.");
- SendClientMessage(playerid, -1, "{66CC33}> {B2B285}Miłej gry na serwerze życzy Administracja!");
- SendClientMessage(playerid, -1, "{66CC33}> {C2C2C2}Ostatnia kompilacja mapy: {FF6666}"#UPDATE" {C2C2C2}przez {FF6666}"#AUTHOR"{C2C2C2}.");
- SendClientMessage(playerid, -1, "{FFFF00}*******************************************************");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- switch(dialogid) {
- case DIALOG_NOTHING: {
- if(!response) {
- return 1;
- }
- else if(response) {
- return 1;
- }
- }
- case DIALOG_REGISTER: {
- if(!response) {
- KickEx(playerid);
- }
- else if(response) {
- new Query_0[384];
- new Format_0[256], Format_1[256];
- new Strcat_0[256];
- if(strlen(inputtext) == 0) {
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
- strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
- strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
- return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
- }
- if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
- strcat(Strcat_0, "Musisz się zarejestrować, aby twoje postępy były zapisywane.\n");
- strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
- return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Rejestracja", Strcat_0, "Rejestruj", "Wyjdź");
- }
- Player_Info[playerid][Player_Logged] = true;
- format(Format_0, sizeof(Format_0), "{67D1B0}Mamy nowego zarejestrowanego gracza! {FFFF00}%s {67D1B0}witamy!", Player_Info[playerid][Player_Username]);
- mysql_query(Format_0);
- format(Query_0, sizeof(Query_0), "INSERT INTO `Players` (`Username`, `Password`) VALUES ('%s', md5('%s'));", Player_Info[playerid][Player_Username], inputtext);
- mysql_query(Query_0);
- }
- }
- case DIALOG_LOGIN: {
- if(!response) {
- KickEx(playerid);
- }
- else if(response) {
- new Query_0[384], Query_1[384], Query_2[384];
- new Label_0[384];
- new Format_0[256], Format_1[256];
- new Strcat_0[256];
- if(strlen(inputtext) == 0) {
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witamy ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
- }
- if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
- }
- format(Query_0, sizeof(Query_0), "SELECT `Username` FROM `Admins` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
- mysql_query(Query_0);
- mysql_store_result();
- if(!mysql_num_rows()) {
- Player_Info[playerid][Player_Is_Admin] = false;
- }
- else {
- Player_Info[playerid][Player_Is_Admin] = true;
- callcmd::alogin(playerid);
- }
- mysql_free_result();
- format(Query_1, sizeof(Query_1), "SELECT * FROM `Players` WHERE `Username` = '%s' AND `Password` = md5('%s');", Player_Info[playerid][Player_Username], inputtext);
- mysql_query(Query_1);
- mysql_store_result();
- if(!mysql_num_rows()) {
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Konto na tym nicku jest {FF0000}zarejestrowane{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Wyjdź");
- }
- else {
- mysql_fetch_field("Unique_ID", Query_1);
- Player_Info[playerid][Player_Unique_ID] = strval(Query_1);
- mysql_fetch_field("Score", Query_1);
- Player_Info[playerid][Player_Score] = strval(Query_1);
- mysql_fetch_field("Money", Query_1);
- Player_Info[playerid][Player_Money] = strval(Query_1);
- mysql_fetch_field("Kills", Query_1);
- Player_Info[playerid][Player_Kills] = strval(Query_1);
- mysql_fetch_field("Deaths", Query_1);
- Player_Info[playerid][Player_Deaths] = strval(Query_1);
- mysql_fetch_field("Killstreak", Query_1);
- Player_Info[playerid][Player_Killstreak] = strval(Query_1);
- mysql_fetch_field("Skin", Query_1);
- Player_Info[playerid][Player_Skin] = strval(Query_1);
- mysql_fetch_field("Bags", Query_1);
- Player_Info[playerid][Player_Bags] = strval(Query_1);
- }
- mysql_free_result();
- format(Query_2, sizeof(Query_2), "SELECT `Username` FROM `Vehicles` WHERE `Username` = '%s';", Player_Info[playerid][Player_Username]);
- mysql_query(Query_2);
- mysql_store_result();
- if(!mysql_num_rows()) {
- return 1;
- }
- else {
- mysql_fetch_field("Model", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Model] = strval(Query_2);
- mysql_fetch_field("Main_Color", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Main_Color] = strval(Query_2);
- mysql_fetch_field("Primary_Color", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Primary_Color] = strval(Query_2);
- mysql_fetch_field("Paintjob", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Paintjob] = strval(Query_2);
- mysql_fetch_field("Mileage", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Mileage] = floatstr(Query_2);
- mysql_fetch_field("Fuel", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Fuel] = floatstr(Query_2);
- mysql_fetch_field("Fuel_Type", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Fuel_Type] = strval(Query_2);
- mysql_fetch_field("Parking_X", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Parking_X] = floatstr(Query_2);
- mysql_fetch_field("Parking_Y", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Parking_Y] = floatstr(Query_2);
- mysql_fetch_field("Parking_Z", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Parking_Z] = floatstr(Query_2);
- mysql_fetch_field("Parking_A", Query_2);
- Priv_Car_Info[playerid][Priv_Car_Parking_A] = floatstr(Query_2);
- }
- mysql_free_result();
- 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],
- Priv_Car_Info[playerid][Priv_Car_Parking_A], Priv_Car_Info[playerid][Priv_Car_Main_Color], Priv_Car_Info[playerid][Priv_Car_Primary_Color]);
- ChangeVehiclePaintjob(Player_Info[playerid][Player_Priv_Car], Priv_Car_Info[playerid][Priv_Car_Paintjob]);
- SetVehicleInterior(Player_Info[playerid][Player_Priv_Car], 0);
- SetVehicleVirtualWorld(Player_Info[playerid][Player_Priv_Car], 0);
- Vehicle_Is_Server[Player_Info[playerid][Player_Priv_Car]] = false;
- Vehicle_Is_Public[Player_Info[playerid][Player_Priv_Car]] = false;
- Vehicle_Is_Private[Player_Info[playerid][Player_Priv_Car]] = true;
- Player_Info[playerid][Player_Logged] = true;
- switch(Priv_Car_Info[playerid][Priv_Car_Fuel_Type]) {
- case 0: {
- 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);
- }
- case 1: {
- 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);
- }
- case 2: {
- 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);
- }
- }
- Priv_Car_Info[playerid][Priv_Car_Label] = Create3DTextLabel(Label_0, -1, 0.0, 0.0, 0.0, 20, 0, 1);
- Attach3DTextLabelToVehicle(Priv_Car_Info[playerid][Priv_Car_Label], Player_Info[playerid][Player_Priv_Car], 0.0, 0.0, 0.0);
- format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID: %d] {FF9900}dołączył do serwera.", Player_Info[playerid][Player_Username]);
- mysql_query(Format_0);
- }
- }
- case DIALOG_ADMIN_PASSWORD: {
- if(!response) {
- Player_Info[playerid][Player_Is_Admin] = false;
- return Player_Info[playerid][Player_Admin] = 0;
- }
- else if(response) {
- new Query_0[256];
- new Format_0[384];
- new Strcat_0[384];
- if(strlen(inputtext) == 0) {
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
- }
- if(strlen(inputtext) <= 4 || strlen(inputtext) >= 20) {
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
- }
- 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]);
- mysql_query(Query_0);
- }
- }
- case DIALOG_ADMIN_LOGIN: {
- if(!response) {
- return 1;
- }
- else if(response) {
- new Query_0[384];
- new Format_0[384];
- new Strcat_0[384];
- format(Query_0, sizeof(Query_0), "SELECT `Level` FROM `Admins` WHERE `Username` = '%s' AND `Password` = md5('%s');", Player_Info[playerid][Player_Username], inputtext);
- mysql_query(Query_0);
- mysql_store_result();
- if(!mysql_num_rows()) {
- new Format_1[128];
- format(Format_1, sizeof(Format_1), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_1);
- strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_INPUT, "Logowanie", Strcat_0, "Loguj", "Zamknij");
- }
- else {
- mysql_fetch_field("Level", Query_0);
- Player_Info[playerid][Player_Admin] = strval(Query_0);
- }
- mysql_free_result();
- 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));
- SendClientMessage(playerid, -1, Format_0);
- }
- }
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid) {
- if(Player_Info[playerid][Player_Skin] != 0) {
- SetPlayerSkin(playerid, Player_Info[playerid][Player_Skin]);
- }
- SetPlayerPos(playerid, 3390.5515, 1679.1806, 106.6665);
- SetPlayerFacingAngle(playerid, 89.9263);
- SetPlayerCameraPos(playerid, 3385.5515, 1679.1871, 106.6665);
- SetPlayerCameraLookAt(playerid, 3390.5515, 1679.1806, 106.6665);
- return 1;
- }
- public OnPlayerSpawn(playerid) {
- for(new i = 0; i < 2; i += 1) {
- TextDrawShowForPlayer(playerid, TextDraw_Zabawy[i]);
- }
- for(new i = 0; i < 2; i += 1) {
- TextDrawShowForPlayer(playerid, TextDraw_StatystykiBox[i]);
- }
- SetPlayerRandomSpawn(playerid);
- GivePlayerWeapons(playerid);
- PlayerTextDrawShow(playerid, TextDraw_Nick[playerid]);
- PlayerTextDrawShow(playerid, TextDraw_Statystyki[playerid]);
- TextDrawShowForPlayer(playerid, TextDraw_Godzina);
- TextDrawShowForPlayer(playerid, TextDraw_Data);
- TextDrawShowForPlayer(playerid, TextDraw_Gracze);
- TextDrawShowForPlayer(playerid, TextDraw_Areny);
- TextDrawShowForPlayer(playerid, TextDraw_Nazwa);
- TextDrawShowForPlayer(playerid, TextDraw_Strona);
- return 1;
- }
- public OnPlayerUpdate(playerid) {
- SetPlayerScore(playerid, Player_Info[playerid][Player_Score]);
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, Player_Info[playerid][Player_Money]);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate) {
- if(newstate == PLAYER_STATE_DRIVER) {
- for(new i = 0; i < 5; i += 1) {
- PlayerTextDrawShow(playerid, TextDraw_LicznikInformacje[playerid][i]);
- }
- for(new i = 0; i < 2; i += 1) {
- TextDrawShowForPlayer(playerid, TextDraw_LicznikBox[i]);
- }
- PlayerTextDrawSetPreviewModel(playerid, TextDraw_LicznikInformacje[playerid][0], GetVehicleModel(GetPlayerVehicleID(playerid)));
- }
- else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) {
- for(new i = 0; i < 5; i += 1) {
- PlayerTextDrawHide(playerid, TextDraw_LicznikInformacje[playerid][i]);
- }
- for(new i = 0; i < 2; i += 1) {
- TextDrawHideForPlayer(playerid, TextDraw_LicznikBox[i]);
- }
- }
- return 1;
- }
- public OnPlayerPickUpDynamicPickup(playerid, pickupid) {
- if(pickupid == Bag_Info[Bag_Pickup]) {
- new Format_0[384];
- for(new i = 0; i < 4; i += 1) {
- TextDrawHideForAll(TextDraw_Walizka[i]);
- }
- DestroyDynamicPickup(Bag_Info[Bag_Pickup]);
- Bag_Info[Bag_Placed] = false;
- Player_Info[playerid][Player_Score] += Bag_Info[Bag_Score];
- Player_Info[playerid][Player_Money] += Bag_Info[Bag_Money];
- Player_Info[playerid][Player_Bags] += 1;
- 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]);
- SendClientMessageToAll(-1, Format_0);
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
- if(KEY_PRESSED(KEY_FIRE)) {
- if(IsPlayerInAnyVehicle(playerid) == 1) {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- }
- }
- else if(KEY_RELEASED(KEY_FIRE)) {
- RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- if(KEY_PRESSED(KEY_SUBMISSION)) {
- if(IsPlayerInAnyVehicle(playerid)) {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
- callcmd::napraw(playerid);
- }
- }
- }
- return 1;
- }
- public OnPlayerText(playerid, text[]) {
- new Format_0[512];
- text[0] = toupper(text[0]);
- switch(Player_Info[playerid][Player_Admin]) {
- case 0: {
- format(Format_0, sizeof(Format_0), "{%06x}%s {C2C2C2}(Gracz ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
- }
- case 1: {
- format(Format_0, sizeof(Format_0), "{%06x}%s {FFCC99}(Eventowicz ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
- }
- case 2: {
- format(Format_0, sizeof(Format_0), "{%06x}%s {66CC33}(Moderator ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
- }
- case 3: {
- format(Format_0, sizeof(Format_0), "{%06x}%s {FF6666}(Admin ID:%i){FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, Player_Info[playerid][Player_Username], playerid, text);
- }
- case 4: {
- 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);
- }
- case 5: {
- 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);
- }
- }
- SendClientMessageToAll(-1, Format_0);
- return 0;
- }
- public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) {
- if(result == -1) {
- return SendClientMessage(playerid, -1, "{66CC33}Nie ma takiej komendy! {FFFF00}Zobacz: {F7A26F}/cmd{FFFF00}.");
- }
- return 1;
- }
- public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) {
- if(issuerid != INVALID_PLAYER_ID) {
- if(weapon == 33 || weapon == 34) {
- if(bodypart == 9) {
- SetPlayerHealth(playerid, 0);
- }
- }
- PlayerPlaySound(issuerid, 17802, 0, 0, 0);
- }
- return 1;
- }
- /*public OnPlayerDeath(playerid, killerid, reason) {
- if(killerid == INVALID_PLAYER_ID) {
- return 1;
- }
- else {
- return 1;
- }
- return 1;
- }*/
- public OnPlayerDisconnect(playerid, reason) {
- SavePlayerStats(playerid);
- return 1;
- }
- public OnGameModeExit() {
- foreach(Player, i) {
- if(Player_Info[i][Player_Logged] == true) {
- OnPlayerDisconnect(i, 1);
- }
- }
- return 1;
- }
- //--------------------------------------------------------------------------//
- // STOCK //
- //--------------------------------------------------------------------------//
- stock GetPlayerLevel(playerid) {
- new Level;
- do {
- Level += 1;
- }
- while(Level * Level * 15 < Player_Info[playerid][Player_Score]);
- return (Level - 1 < 1) ? 1 : Level - 1;
- }
- stock GetPlayerNextLevel(playerid) {
- return (GetPlayerLevel(playerid) + 1) * (GetPlayerLevel(playerid) + 1) * 15;
- }
- stock GetPlayerAdmin(playerid) {
- new Admin[32];
- switch(Player_Info[playerid][Player_Admin]) {
- case 1: {
- Admin = "{FFCC99}Eventowicz";
- }
- case 2: {
- Admin = "{66CC33}Moderator";
- }
- case 3: {
- Admin = "{FF6666}Admin";
- }
- case 4: {
- Admin = "{17CDDF}Elite Admin";
- }
- case 5: {
- Admin = "{FF9900}Head Admin";
- }
- }
- return Admin;
- }
- stock GetAdmins() {
- new Admins;
- foreach(Player, i) {
- if(Player_Info[i][Player_Admin] == 5 || Player_Info[i][Player_Admin] == 4 || Player_Info[i][Player_Admin] == 3) {
- Admins += 1;
- }
- }
- return Admins;
- }
- stock GetModerators() {
- new Moderators;
- foreach(Player, i) {
- if(Player_Info[i][Player_Admin] == 2 || Player_Info[i][Player_Admin] == 1) {
- Moderators += 1;
- }
- }
- return Moderators;
- }
- /*stock GetVIPs() {
- new VIPs;
- foreach(Player, i) {
- if(PlayerInfo[i][PLayer_VIP] != 0) {
- VIPs += 1;
- }
- }
- return VIPs;
- }*/
- stock GetPlayerVehicleSpeed(vehicleid) {
- new Float:fX, Float:fY, Float:fZ;
- GetVehicleVelocity(vehicleid, fX, fY, fZ);
- return floatround(floatsqroot(fX * fX + fY * fY + fZ * fZ) * 170.00);
- }
- stock SetPlayerRandomColor(playerid) {
- new i = random(sizeof(ColorList));
- return SetPlayerColor(playerid, ColorList[i]);
- }
- stock BanPlayer(playernick[], playerid, adminnick[], adminid, czas, powod[], playerip[], playergpci[]) {
- new Rok, Miesiac, Dzien, Godzina, Minuta;
- new Query_0[512];
- new Format_0[512];
- gettime(Godzina, Minuta, _);
- getdate(Rok, Miesiac, Dzien);
- TogglePlayerSpectating(playerid, 1);
- KickEx(playerid);
- 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');",
- playernick, adminnick, gettime() + 24 * 60 * 60 * czas, Godzina, Minuta, Dzien, Miesiac, Rok, powod, playerip, playergpci);
- mysql_query(Query_0);
- format(Format_0, sizeof(Format_0), "{FFFF00}%s [ID:%i] {FF0000}został(a) zbanowany(a) przez %s [ID:%i].", playernick, playerid, adminnick, adminid);
- SendClientMessageToAll(-1, Format_0);
- format(Format_0, sizeof(Format_0), "{FF0000}Powód: %s", powod);
- SendClientMessageToAll(-1, Format_0);
- SendClientMessage(playerid, -1, "{63AFF0}Myślisz, że zostałeś(aś) niesłusznie zbanowany(a)? Napisz na forum www.serwer-pms.ct8.pl.");
- SendClientMessage(playerid, -1, "{63AFF0}Do wniosku o UB potrzebny jest screen z gry. Zrób screen za pomocą przycisku F8!");
- return 1;
- }
- stock KickEx(playerid)
- {
- return SetTimerEx("Kick_Ex", 250, 0, "d", playerid);
- }
- stock KickPlayer(playernick[], playerid, adminnick[], adminid, powod[]) {
- new Format_0[512];
- TogglePlayerSpectating(playerid, 1);
- KickEx(playerid);
- format(Format_0, sizeof(Format_0), "{FFFF00}%s [ID:%i] {FF0000}został(a) wyrzucony(a) przez %s [ID:%i].", playernick, playerid, adminnick, adminid);
- SendClientMessageToAll(-1, Format_0);
- format(Format_0, sizeof(Format_0), "{FF0000}Powód: %s", powod);
- SendClientMessageToAll(-1, Format_0);
- SendClientMessage(playerid, -1, "{63AFF0}Myślisz, że zostałeś(aś) niesłusznie wyrzucony(a)? Napisz na forum www.serwer-pms.ct8.pl.");
- return 1;
- }
- stock LoadBan(playerid) {
- new Query_0[256];
- 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]);
- mysql_query(Query_0);
- mysql_store_result();
- if(!mysql_num_rows()) {
- return 1;
- }
- else {
- new Gracz[MAX_PLAYER_NAME], Admin[MAX_PLAYER_NAME], Czas, Data[64], Powod[64], IP[64], GPCI[64];
- mysql_fetch_field("Username", Gracz);
- mysql_fetch_field("Admin", Admin);
- mysql_fetch_field("Time", Query_0);
- Czas = strval(Query_0);
- mysql_fetch_field("Date", Data);
- mysql_fetch_field("Reason", Powod);
- mysql_fetch_field("IP", IP);
- mysql_fetch_field("GPCI", GPCI);
- if(Czas > gettime()) {
- new Format_0[384];
- SendClientMessage(playerid, -1, "{63AFF0}To IP oraz Nick jest zbanowane czasowo.");
- format(Format_0, sizeof(Format_0), "Ban do: {66CC33}@NULL");
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "Twoje IP: {66CC33}%s", IP);
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "Nick banującego: {66CC33}%s", Admin);
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "Data zdarzenia: {66CC33}%s", Data);
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "Powód: {66CC33}%s", Powod);
- SendClientMessage(playerid, -1, Format_0);
- 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.");
- return KickEx(playerid);
- }
- else {
- new Query_1[128];
- format(Query_1, sizeof(Query_1), "DELETE FROM `Bans` WHERE `Username` = '%s' OR `IP` = '%s' OR `GPCI` = '%s';", Gracz, IP, GPCI);
- mysql_query(Query_1);
- }
- }
- mysql_free_result();
- return 1;
- }
- stock SavePlayerStats(playerid) {
- new Query_0[512];
- 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';",
- 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]);
- mysql_query(Query_0);
- return 1;
- }
- //--------------------------------------------------------------------------//
- // PRIVATE //
- //--------------------------------------------------------------------------//
- private OnShowAdvert() {
- new Format_0[512];
- 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.");
- SendClientMessageToAll(-1, Format_0);
- 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).");
- SendClientMessageToAll(-1, Format_0);
- 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.");
- SendClientMessageToAll(-1, Format_0);
- 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!");
- SendClientMessageToAll(-1, Format_0);
- return 1;
- }
- private SetPlayerRandomSpawn(playerid) {
- switch(Player_Info[playerid][Player_On_Arena]) {
- case 0: {
- new i = random(sizeof(FreeroamSpawnList));
- SetPlayerPos(playerid, FreeroamSpawnList[i][0], FreeroamSpawnList[i][1], FreeroamSpawnList[i][2]);
- }
- }
- return 1;
- }
- private GivePlayerWeapons(playerid) {
- new Format_0[384];
- switch(Player_Info[playerid][Player_On_Arena]) {
- case 0..4: {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 7, 1);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 25, 500);
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerWeapon(playerid, 33, 500);
- format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}1/5{FF9900}.", GetPlayerLevel(playerid));
- SendClientMessage(playerid, -1, Format_0);
- SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
- }
- case 5..12: {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 25, 500);
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 33, 500);
- format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}2/5{FF9900}.", GetPlayerLevel(playerid));
- SendClientMessage(playerid, -1, Format_0);
- SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
- }
- case 13..18: {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 27, 500);
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 34, 500);
- format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}3/5{FF9900}.", GetPlayerLevel(playerid));
- SendClientMessage(playerid, -1, Format_0);
- SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
- }
- case 19..30: {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 26, 500);
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 34, 500);
- format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}4/5{FF9900}.", GetPlayerLevel(playerid));
- SendClientMessage(playerid, -1, Format_0);
- SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
- }
- default: {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 24, 500);
- GivePlayerWeapon(playerid, 26, 500);
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 31, 500);
- GivePlayerWeapon(playerid, 34, 500);
- format(Format_0, sizeof(Format_0), "{FF9900}Twój poziom to {FFFF00}%d{FF9900}, otrzymujesz zestaw broni: {C2C2C2}5/5{FF9900}.", GetPlayerLevel(playerid));
- SendClientMessage(playerid, -1, Format_0);
- SendClientMessage(playerid, -1, "{FF9900}Jeżeli chciałbyś dowiedzieć się więcej o broniach i poziomie, wpisz {66CC33}/poziomy{FF9900}.");
- }
- }
- return 1;
- }
- private OnUpdatePlayer() {
- foreach(Player, i) {
- new Year, Month, Day, Hour, Minute;
- new Format_0[MAX_PLAYER_NAME], Format_1[512], Format_2[64], Format_3[64], Format_4[64];
- OnUpdateLabel(i);
- gettime(Hour, Minute, _);
- getdate(Year, Month, Day);
- if(IsPlayerInAnyVehicle(i)) {
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
- new Format_99[64], Format_98[64], Format_97[64], Format_96[64];
- new Float:VehicleHealth;
- if(IsPlayerInVehicle(playersid, PlayerInfo[playersid][PlayerPrivateVehicle])) {
- }
- GetVehicleHealth(GetPlayerVehicleID(i), VehicleHealth);
- format(Format_99, sizeof(Format_99), "~y~] ~g~~h~%s ~y~]", VehicleList[GetVehicleModel(GetPlayerVehicleID(i)) - 400]);
- PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][1], Format_99);
- format(Format_98, sizeof(Format_98), "~g~~h~Predkosc: ~y~~h~%dkm/h", GetPlayerVehicleSpeed(GetPlayerVehicleID(i)));
- PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][2], Format_98);
- format(Format_97, sizeof(Format_97), "~g~~h~Status: ~y~~h~Otwarty");
- PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][3], Format_97);
- format(Format_96, sizeof(Format_96), "~g~~h~Stan: ~y~~h~%.0f/100", VehicleHealth / 10);
- PlayerTextDrawSetString(i, TextDraw_LicznikInformacje[i][4], Format_96);
- }
- }
- format(Format_0, sizeof(Format_0), "%s", Player_Info[i][Player_Username]);
- PlayerTextDrawSetString(i, TextDraw_Nick[i], Format_0);
- 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",
- 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);
- PlayerTextDrawSetString(i, TextDraw_Statystyki[i], Format_1);
- format(Format_2, sizeof(Format_2), "%02d:%02d", Hour, Minute);
- TextDrawSetString(TextDraw_Godzina, Format_2);
- format(Format_3, sizeof(Format_3), "%02d.%02d.%d", Day, Month, Year);
- TextDrawSetString(TextDraw_Data, Format_3);
- format(Format_4, sizeof(Format_4), "(~y~0~w~/~b~%d~w~/~r~%d~w~)"/*, GetVIPs()*/, GetModerators(), GetAdmins());
- TextDrawSetString(TextDraw_Gracze, Format_4);
- Player_Info[i][Player_Online_Time] += 1;
- /* format(Format_0, sizeof(Format_0), "");
- PlayerTextDrawSetString(i, JakisTD, Format_0);
- format(Format_0, sizeof(Format_0), "");
- TextDrawSetString(JakisTD, Format_0);*/
- }
- return 1;
- }
- private OnUpdateLabel(playerid) {
- new Format_0[384];
- switch(Player_Info[playerid][Player_Admin]) {
- case 0: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- case 1: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- case 2: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- case 3: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- case 4: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- case 5: {
- 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));
- Update3DTextLabelText(Player_Info[playerid][Player_Label], 0xFFFFFFFF, Format_0);
- }
- }
- return 1;
- }
- private Kick_Ex(playerid)
- {
- return Kick(playerid);
- }
- //--------------------------------------------------------------------------//
- // HEAD ADMIN COMMAND //
- //--------------------------------------------------------------------------//
- CMD:setadmin(playerid, cmdtext[]) {
- new IDGracza, Poziom;
- new Query_0[384];
- new Format_0[256], Format_1[256];
- new Strcat_0[256];
- if(IsPlayerAdmin(playerid) == 0) {
- if(Player_Info[playerid][Player_Admin] < 5) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- }
- if(sscanf(cmdtext, "dd", IDGracza, Poziom)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Setadmin [ID/Nick] [Poziom].", "Zamknij", "");
- }
- if(!IsPlayerConnected(IDGracza)) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
- }
- if(Poziom < 0 || Poziom > 5) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Podany admin jest niepoprawny!");
- }
- if(Player_Info[IDGracza][Player_Is_Admin] == true) {
- if(Poziom <= 0) {
- Player_Info[IDGracza][Player_Is_Admin] = false;
- format(Query_0, sizeof(Query_0), "DELETE FROM `Admins` WHERE `Username` = '%s';", Player_Info[IDGracza][Player_Username]);
- mysql_query(Query_0);
- 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));
- SendClientMessage(playerid, -1, Format_0);
- 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));
- SendClientMessage(IDGracza, -1, Format_1);
- return Player_Info[IDGracza][Player_Admin] = 0;
- }
- Player_Info[IDGracza][Player_Admin] = Poziom;
- format(Query_0, sizeof(Query_0), "UPDATE `Admins` SET `Level` = '%d' WHERE `Username` = '%s';", Player_Info[IDGracza][Player_Admin], Player_Info[IDGracza][Player_Username]);
- mysql_query(Query_0);
- 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));
- SendClientMessage(playerid, -1, Format_0);
- 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));
- SendClientMessage(IDGracza, -1, Format_1);
- }
- else if(Player_Info[IDGracza][Player_Is_Admin] == false) {
- Player_Info[playerid][Player_Is_Admin] = true;
- Player_Info[playerid][Player_Admin] = Poziom;
- 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));
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj {FFFF00}%s{FFFFFF}.\n", Player_Info[IDGracza][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Wygląda na to, że jestes tu {FF0000}po raz pierwszy{FFFFFF}.\n");
- strcat(Strcat_0, "Musisz się zarejestrować, aby twój admin był aktywny.\n");
- strcat(Strcat_0, "Poniżej podaj hasło, którym będziesz się logował.");
- ShowPlayerDialog(IDGracza, DIALOG_ADMIN_PASSWORD, DIALOG_STYLE_INPUT, "Informacja", Strcat_0, "Ustaw", "");
- }
- return 1;
- }
- //--------------------------------------------------------------------------//
- // ELITE ADMIN COMMAND //
- //--------------------------------------------------------------------------//
- //--------------------------------------------------------------------------//
- // ADMIN COMMAND //
- //--------------------------------------------------------------------------//
- CMD:ban(playerid, cmdtext[]) {
- new IDGracza;
- new Powod[256];
- new Czas;
- if(Player_Info[playerid][Player_Admin] <= 3) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- if(sscanf(cmdtext, "dds[256]", IDGracza, Czas, Powod)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Ban [ID/Nick] [Czas] [Powód].", "Zamknij", "");
- }
- if(!IsPlayerConnected(IDGracza)) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
- }
- 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]);
- return 1;
- }
- //--------------------------------------------------------------------------//
- // MODERATOR COMMAND //
- //--------------------------------------------------------------------------//
- CMD:kick(playerid, cmdtext[]) {
- new IDGracza;
- new Powod[256];
- if(Player_Info[playerid][Player_Admin] <= 2) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- if(sscanf(cmdtext, "ds[256]", IDGracza, Powod)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Kick [ID/Nick] [Powód].", "Zamknij", "");
- }
- if(!IsPlayerConnected(IDGracza)) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
- }
- KickPlayer(Player_Info[IDGracza][Player_Username], IDGracza, Player_Info[playerid][Player_Username], playerid, Powod);
- return 1;
- }
- CMD:walizka(playerid, cmdtext[]) {
- new EXP, Kasa;
- new Podpowiedz[256];
- new Format0[256], Format2[128];
- new Float:fX, Float:fY, Float:fZ;
- if(Player_Info[playerid][Player_Admin] <= 2) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- if(sscanf(cmdtext, "dds[256]", EXP, Kasa, Podpowiedz)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Walizka [EXP] [Kasa] [Podpowiedź].", "Zamknij", "");
- }
- if(Bag_Info[Bag_Placed] == true) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Walizka jest już na mapie!");
- }
- for(new i = 0; i < 4; i += 1) {
- TextDrawShowForAll(TextDraw_Walizka[i]);
- }
- GetPlayerPos(playerid, fX, fY, fZ);
- Bag_Info[Bag_Pickup] = CreateDynamicPickup(1210, 23, fX, fY, fZ);
- Bag_Info[Bag_Placed] = true;
- Bag_Info[Bag_Score] = EXP;
- Bag_Info[Bag_Money] = Kasa;
- format(Format0, sizeof(Format0), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}zgubił walizkę. Podpowiedź: {FFFF00}%s", Player_Info[playerid][Player_Username], playerid, Podpowiedz);
- SendClientMessageToAll(-1, Format0);
- format(Format2, sizeof(Format2), "Podpowiedz:~n~> %s", Podpowiedz);
- TextDrawSetString(TextDraw_Walizka[3], Format2);
- return 1;
- }
- CMD:delwalizka(playerid) {
- new Format0[128];
- if(Player_Info[playerid][Player_Admin] <= 2) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- if(Bag_Info[Bag_Placed] == false) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Walizki nie ma na mapie!");
- }
- for(new i = 0; i < 4; i += 1) {
- TextDrawHideForAll(TextDraw_Walizka[i]);
- }
- DestroyDynamicPickup(Bag_Info[Bag_Pickup]);
- Bag_Info[Bag_Placed] = false;
- Bag_Info[Bag_Score] = 0;
- Bag_Info[Bag_Money] = 0;
- format(Format0, sizeof(Format0), "{FF9900}Administrator {FFFF00}%s [ID:%i] {FF9900}usunął walizkę.", Player_Info[playerid][Player_Username], playerid);
- SendClientMessageToAll(-1, Format0);
- return 1;
- }
- //--------------------------------------------------------------------------//
- // EVENTOWICZ COMMAND //
- //--------------------------------------------------------------------------//
- CMD:alogin(playerid) {
- new Format_0[384];
- new Strcat_0[384];
- if(Player_Info[playerid][Player_Is_Admin] == false) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie masz uprawnień do używania tej komendy!");
- }
- if(Player_Info[playerid][Player_Admin] == 0) {
- format(Format_0, sizeof(Format_0), "{FFFFFF}Witaj ponownie {FFFF00}%s{FFFFFF}.\n", Player_Info[playerid][Player_Username]);
- strcat(Strcat_0, Format_0);
- strcat(Strcat_0, "Admin na tym nicku jest {FF0000}aktywny{FFFFFF}.\n");
- strcat(Strcat_0, "Prosimy o wpisanie hasła, które zostąło podane przy rejestracji.");
- return ShowPlayerDialog(playerid, DIALOG_ADMIN_LOGIN, DIALOG_STYLE_PASSWORD, "Logowanie", Strcat_0, "Loguj", "Zamknij");
- }
- if(Player_Info[playerid][Player_Admin] != 0) {
- 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));
- Player_Info[playerid][Player_Admin] = 0;
- return SendClientMessage(playerid, -1, Format_0);
- }
- return 1;
- }
- //--------------------------------------------------------------------------//
- // PLAYER COMMAND //
- //--------------------------------------------------------------------------//
- CMD:zw(playerid) {
- new Format_0[256];
- if(GetTickCount() < Command_Info[playerid][Command_Zw]) {
- new Format_1[256];
- 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);
- return SendClientMessage(playerid, -1, Format_1);
- }
- if(Player_Info[playerid][Player_Away] == true) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Jesteś już AFK!");
- }
- TogglePlayerControllable(playerid, 0);
- Player_Info[playerid][Player_Away] = true;
- Command_Info[playerid][Command_Zw] = 30000;
- format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID:%i] {FF9900}zaraz wraca (AFK).", Player_Info[playerid][Player_Username], playerid);
- SendClientMessageToAll(-1, Format_0);
- return 1;
- }
- CMD:jj(playerid) {
- new Format_0[256];
- if(Player_Info[playerid][Player_Away] == false) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie jesteś AFK!");
- }
- TogglePlayerControllable(playerid, 1);
- Player_Info[playerid][Player_Away] = false;
- format(Format_0, sizeof(Format_0), "{FF9900}Gracz {FFFF00}%s [ID:%i] {FF9900}już jest!", Player_Info[playerid][Player_Username], playerid);
- SendClientMessageToAll(-1, Format_0);
- return 1;
- }
- CMD:pm(playerid, cmdtext[]) {
- new IDGracza;
- new Wiadomosc[256];
- new Format_0[256], Format_1[256];
- if(sscanf(cmdtext, "ds[256]", IDGracza, Wiadomosc)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Pm [ID/Nick] [Wiadomość].", "Zamknij", "");
- }
- if(!IsPlayerConnected(IDGracza)) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Ten gracz nie jest podłączony!");
- }
- if(IDGracza == playerid) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Nie możesz pisać sam do siebie!");
- }
- PlayerPlaySound(IDGracza, 1057, 0.0, 0.0, 0.0);
- format(Format_0, sizeof(Format_0), "{FFFF00}Wiadmość do: {63AFF0}%s [ID:%i].", Player_Info[IDGracza][Player_Username], IDGracza);
- SendClientMessage(playerid, -1, Format_0);
- format(Format_0, sizeof(Format_0), "{FFFF00}Treść: {63AFF0}%s.", Wiadomosc);
- SendClientMessage(playerid, -1, Format_0);
- format(Format_1, sizeof(Format_1), "{FFFF00}Wiadmość od: {63AFF0}%s [ID:%i].", Player_Info[playerid][Player_Username], playerid);
- SendClientMessage(IDGracza, -1, Format_1);
- format(Format_1, sizeof(Format_1), "{FFFF00}Treść: {63AFF0}%s.", Wiadomosc);
- SendClientMessage(IDGracza, -1, Format_1);
- return 1;
- }
- CMD:skin(playerid, cmdtext[]) {
- new Skin;
- new Format0[128];
- if(sscanf(cmdtext, "d", Skin)) {
- return ShowPlayerDialog(playerid, DIALOG_NOTHING, DIALOG_STYLE_MSGBOX, "Informacja", "{FFFF00}Użyj: {01FCFF}/Skin [ID].", "Zamknij", "");
- }
- if(Skin < 0 || Skin > 311) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Podany skin jest niepoprawny lub zablokowany!");
- }
- SetPlayerSkin(playerid, Skin);
- Player_Info[playerid][Player_Skin] = GetPlayerSkin(playerid);
- format(Format0, sizeof(Format0), "{FF9900}Zmieniłeś swój skin na {FFFF00}%d{FF9900}!", Skin);
- SendClientMessage(playerid, -1, Format0);
- return 1;
- }
- CMD:napraw(playerid) {
- if(Player_Info[playerid][Player_Money] < 2500) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Masz za mało pieniędzy na naprawe! Potrzebujesz 2.500$.");
- }
- if(IsPlayerInAnyVehicle(playerid) == 0) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Musisz być w pojeździe!");
- }
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) {
- return SendClientMessage(playerid, -1, "{FF0000}INFO: {FFFFFF}Musisz być w kierowcą!");
- }
- RepairVehicle(GetPlayerVehicleID(playerid));
- SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- Player_Info[playerid][Player_Money] -= 2500;
- SendClientMessage(playerid, -1, "{C2C2C2}Naprawiłeś pojazd za {9955DE}2.500${C2C2C2}!");
- return 1;
- }
- CMD:naj(playerid) {
- new Format_0[384];
- if(GetTickCount() < Command_Info[playerid][Command_Naj]) {
- new Format_1[256];
- 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);
- return SendClientMessage(playerid, -1, Format_1);
- }
- Player_Info[playerid][Player_Score] += 10;
- Player_Info[playerid][Player_Money] += 30000;
- Command_Info[playerid][Command_Naj] = 180000;
- 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);
- SendClientMessageToAll(-1, Format_0);
- SendClientMessage(playerid, -1, "{FFFFFF}(i) {FF9900}Dostałeś dodatkowe {FFFF00}10 EXP'a {FF9900}oraz {FFFF00}30.000${FF9900}.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement