Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Credits to Y_Less, Dracoblue and Kush.
- #include <a_samp>
- #include <YSI\y_ini>
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define PATH "/Users/%s.ini"
- new Text:NitroAmount[MAX_PLAYERS];
- new Text:NitroLabel;
- new timer1;
- new timer2;
- forward NitroBarUpdate(playerid);
- forward NosUpdate(playerid);
- #define COL_RED 0xFF0000FF
- #define COL_GREEN 0x00FF44FF
- #define COL_YELLOW 0xFFFF00FF
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #define NosConsumSpeed 2 // Increase to loose Nitro faster or decrase to loose it slower (the number must NOT contain period or comma).
- #define NitroBarColor 1340286975 // Change this to the color of progressbar you want to use (you can also put hex numbers e.g. 0xFF0000FF).
- #define NOS_DIALOG 1596 // The nitro purchase dialog ID (list style)
- #define NOS_INPUT 1597 // The custom Nitro purchase dialog ID (input style)
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 100 // Change to the maximum players of your server
- stock CanUseNitro(vehid)
- {
- new vehmodel = GetVehicleModel(vehid);
- switch(vehmodel)
- {
- case 522, 481, 441, 468, 448, 446, 513, 521, 510, 430, 520, 476, 463, 509, 462, 581, 461, 523, 586, 471, 472, 473, 493, 595, 484, 453, 452, 454: return false;
- }
- return true;
- }
- stock IsNumeric(string[]) // Not by me :P
- {
- for(new i = 0; i < strlen(string); i++) if(string[i] > '9' || string[i] < '0') return false;
- return true;
- }
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Text:Textdraw3;
- new Text:Textdraw4;
- new Text:Textdraw5;
- new Text:Textdraw6;
- new Text:Textdraw7;
- new Text:Textdraw8;
- new Text:Textdraw9;
- new Text:Textdraw10;
- new Text:Textdraw11;
- new Text:Textdraw12;
- new Text:Textdraw13;
- new Text:Textdraw14;
- new Text:Textdraw15;
- new Text:Textdraw16;
- new Text:Textdraw17;
- new Text:Textdraw18;
- new Text:Textdraw19;
- new Text:Textdraw20;
- new Text:Textdraw21;
- new Text:Textdraw22;
- new Text:Textdraw23;
- new Text:Textdraw24;
- new Text:Textdraw25;
- new Text:Textdraw26;
- new Text:Textdraw27;
- new Text:Textdraw28;
- new Text:Textdraw29;
- new Text:Textdraw30;
- new Text:Textdraw31;
- new Text:Textdraw32;
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- return 1;
- }
- stock GetSpeed(playerid)
- {
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid))
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 178.8617875;
- return floatround(ST[3]);
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeAvion(id)
- {
- if(id == 592 || id == 577 || id == 511 || id == 512 || id == 593 || id == 520 || id == 553 || id == 476 || id == 519 || id == 460 || id == 513) return 1;
- else if(id == 548 || id == 425 || id == 417 || id == 487 || id == 488 || id == 497 || id == 563 || id == 447 || id == 469) return 1;
- else return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeBrod(id)
- {
- if(id == 472 || id == 473 || id == 493 || id == 484 || id == 430 || id == 454 || id == 453 || id == 452 || id == 446) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeMotor(id)
- {
- if(id == 462 || id == 448 || id == 581 || id == 522 || id == 461 || id == 521 || id == 523 || id == 463 || id == 468 || id == 471) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeBicikla(id)
- {
- if(id == 481 || id == 509 || id == 510) return 1;
- return 0;
- }
- ///////////////////////////////////////////////////////////////////////////
- stock VoziloJeKamion(id)
- {
- if(id == 499 || id == 498 || id == 609 || id == 524 || id == 578 || id == 455 || id == 403 || id == 414 || id == 443 || id == 514 || id == 515 || id == 408 || id == 431 || id == 437 || id == 538) return 1;
- return 0;
- }
- new ImenaVozila[212][] =
- {
- {"Landstal"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"}, {"Dumper"},{"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},{"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},
- {"Washington"},{"Bobcat"},{"Whoopee"},{"BF-INJ"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},{"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Article TR"},{"Previon"},{"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
- {"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Article TR2"},{"Turismo"},{"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC"},{"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"},{"Chopper"},{"Rancher"},{"FBI - Ra"},{"Virgo"},{"Greenwood"},{"Jetmax"},{"Hotring"},
- {"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},{"Mesa"},{"RC Goblin"},{"HR - A"},{"HR - B"},{"Bloodring Banger"},{"Rancher"},{"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stuntplane"},{"Tanker"},{"Roadtrain"},
- {"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},{"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},{"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},{"Blade"},{"Freight"},{"Streak"},{"Vortex"},
- {"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},{"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},{"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},{"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},
- {"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},{"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Dunerider"},{"Sweeper"},{"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},{"Tug"},{"Article Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Mobile Hotdog"},
- {"Club"},{"Carriage"},{"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police"},{"Police"},{"Police"},{"LSDP-Ranger"},{"Picador"},{"SWAT Van"},{"Alpha"},{"Phoenix"},{"Glendale"},{"Sadler"},{"Luggage TR A"},{"Luggage TR B"},{"Stair Trailer"},
- {"Boxville"},{"Farm Plow"},{"Utility TR"}
- };
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- forward RandomMessage();
- new RandomMessages[][] =
- {
- "~y~Welcome too ~w~Server ~g~name.",
- "~y~Welcome too ~w~Server ~r~name.",
- "~y~Welcome too ~w~Server ~y~name.",
- "~y~Welcome too ~w~Server ~b~name."
- };
- /*Credits to Dracoblue*/
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("Blank Script");
- SetTimer("RandomMessage",8000,1);
- timer2 = SetTimer("NitroBarUpdate", 100, true);
- //Global Textdraws:
- Textdraw0 = TextDrawCreate(642.380004, 431.673309, "usebox");
- TextDrawLetterSize(Textdraw0, 0.000000, 1.101055);
- TextDrawTextSize(Textdraw0, -3.440000, 0.000000);
- TextDrawAlignment(Textdraw0, 1);
- TextDrawColor(Textdraw0, 0);
- TextDrawUseBox(Textdraw0, true);
- TextDrawBoxColor(Textdraw0, 102);
- TextDrawSetShadow(Textdraw0, 0);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawFont(Textdraw0, 0);
- Textdraw1 = TextDrawCreate(-0.319991, 428.437377, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw1, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw1, 640.000000, 0.970656);
- TextDrawAlignment(Textdraw1, 1);
- TextDrawColor(Textdraw1, -5963521);
- TextDrawSetShadow(Textdraw1, 0);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawFont(Textdraw1, 4);
- Textdraw2 = TextDrawCreate(-0.040000, 443.549316, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw2, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw2, 639.759948, 1.866657);
- TextDrawAlignment(Textdraw2, 1);
- TextDrawColor(Textdraw2, -5963521);
- TextDrawSetShadow(Textdraw2, 0);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawFont(Textdraw2, 4);
- Textdraw3 = TextDrawCreate(2.080002, 429.258636, "SN");
- TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
- TextDrawAlignment(Textdraw3, 1);
- TextDrawColor(Textdraw3, -5963521);
- TextDrawSetShadow(Textdraw3, 0);
- TextDrawSetOutline(Textdraw3, 0);
- TextDrawBackgroundColor(Textdraw3, 51);
- TextDrawFont(Textdraw3, 3);
- TextDrawSetProportional(Textdraw3, 1);
- Textdraw4 = TextDrawCreate(244.240036, 432.767974, "welcome to server name");
- TextDrawLetterSize(Textdraw4, 0.240399, 0.927999);
- TextDrawAlignment(Textdraw4, 1);
- TextDrawColor(Textdraw4, -1);
- TextDrawSetShadow(Textdraw4, 1);
- TextDrawSetOutline(Textdraw4, 0);
- TextDrawBackgroundColor(Textdraw4, 51);
- TextDrawFont(Textdraw4, 2);
- TextDrawSetProportional(Textdraw4, 1);
- Textdraw5 = TextDrawCreate(372.319793, 417.393432, "usebox");
- TextDrawLetterSize(Textdraw5, 0.000000, 0.903775);
- TextDrawTextSize(Textdraw5, 666.479980, 0.000000);
- TextDrawAlignment(Textdraw5, 1);
- TextDrawColor(Textdraw5, 0);
- TextDrawUseBox(Textdraw5, true);
- TextDrawBoxColor(Textdraw5, 102);
- TextDrawSetShadow(Textdraw5, 0);
- TextDrawSetOutline(Textdraw5, 0);
- TextDrawFont(Textdraw5, 0);
- Textdraw6 = TextDrawCreate(454.680297, 415.458496, "online~w~1");
- TextDrawLetterSize(Textdraw6, 0.275600, 1.129600);
- TextDrawAlignment(Textdraw6, 1);
- TextDrawColor(Textdraw6, -5963521);
- TextDrawSetShadow(Textdraw6, 1);
- TextDrawSetOutline(Textdraw6, 0);
- TextDrawBackgroundColor(Textdraw6, 51);
- TextDrawFont(Textdraw6, 2);
- TextDrawSetProportional(Textdraw6, 1);
- Textdraw7 = TextDrawCreate(379.040069, 415.205352, "record~w~1");
- TextDrawLetterSize(Textdraw7, 0.275600, 1.129600);
- TextDrawAlignment(Textdraw7, 1);
- TextDrawColor(Textdraw7, -5963521);
- TextDrawSetShadow(Textdraw7, 1);
- TextDrawSetOutline(Textdraw7, 0);
- TextDrawBackgroundColor(Textdraw7, 51);
- TextDrawFont(Textdraw7, 2);
- TextDrawSetProportional(Textdraw7, 1);
- Textdraw8 = TextDrawCreate(369.319793, 412.488128, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw8, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw8, 638.400024, 1.493323);
- TextDrawAlignment(Textdraw8, 1);
- TextDrawColor(Textdraw8, -5963521);
- TextDrawSetShadow(Textdraw8, 0);
- TextDrawSetOutline(Textdraw8, 0);
- TextDrawFont(Textdraw8, 4);
- Textdraw9 = TextDrawCreate(364.880065, 409.381256, "/");
- TextDrawLetterSize(Textdraw9, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw9, 1);
- TextDrawColor(Textdraw9, -5963521);
- TextDrawSetShadow(Textdraw9, 0);
- TextDrawSetOutline(Textdraw9, 0);
- TextDrawBackgroundColor(Textdraw9, 51);
- TextDrawFont(Textdraw9, 1);
- TextDrawSetProportional(Textdraw9, 1);
- Textdraw10 = TextDrawCreate(393.439941, 424.038787, "usebox");
- TextDrawLetterSize(Textdraw10, 0.000000, 0.104369);
- TextDrawTextSize(Textdraw10, 383.359924, 0.000000);
- TextDrawAlignment(Textdraw10, 1);
- TextDrawColor(Textdraw10, 0);
- TextDrawUseBox(Textdraw10, true);
- TextDrawBoxColor(Textdraw10, 102);
- TextDrawSetShadow(Textdraw10, 0);
- TextDrawSetOutline(Textdraw10, 0);
- TextDrawFont(Textdraw10, 0);
- Textdraw11 = TextDrawCreate(506.199829, 408.962585, "/");
- TextDrawLetterSize(Textdraw11, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw11, 1);
- TextDrawColor(Textdraw11, -5963521);
- TextDrawSetShadow(Textdraw11, 0);
- TextDrawSetOutline(Textdraw11, 0);
- TextDrawBackgroundColor(Textdraw11, 51);
- TextDrawFont(Textdraw11, 1);
- TextDrawSetProportional(Textdraw11, 1);
- Textdraw12 = TextDrawCreate(439.159912, 408.679901, "/");
- TextDrawLetterSize(Textdraw12, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw12, 1);
- TextDrawColor(Textdraw12, -5963521);
- TextDrawSetShadow(Textdraw12, 0);
- TextDrawSetOutline(Textdraw12, 0);
- TextDrawBackgroundColor(Textdraw12, 51);
- TextDrawFont(Textdraw12, 1);
- TextDrawSetProportional(Textdraw12, 1);
- Textdraw13 = TextDrawCreate(584.960021, 408.842590, "/");
- TextDrawLetterSize(Textdraw13, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw13, 1);
- TextDrawColor(Textdraw13, -5963521);
- TextDrawSetShadow(Textdraw13, 0);
- TextDrawSetOutline(Textdraw13, 0);
- TextDrawBackgroundColor(Textdraw13, 51);
- TextDrawFont(Textdraw13, 1);
- TextDrawSetProportional(Textdraw13, 1);
- Textdraw14 = TextDrawCreate(518.000549, 415.487792, "00:00:2014");
- TextDrawLetterSize(Textdraw14, 0.275600, 1.129600);
- TextDrawAlignment(Textdraw14, 1);
- TextDrawColor(Textdraw14, -1);
- TextDrawSetShadow(Textdraw14, 1);
- TextDrawSetOutline(Textdraw14, 0);
- TextDrawBackgroundColor(Textdraw14, 51);
- TextDrawFont(Textdraw14, 2);
- TextDrawSetProportional(Textdraw14, 1);
- Textdraw15 = TextDrawCreate(600.680358, 415.293182, "00:00");
- TextDrawLetterSize(Textdraw15, 0.275600, 1.129600);
- TextDrawAlignment(Textdraw15, 1);
- TextDrawColor(Textdraw15, -1);
- TextDrawSetShadow(Textdraw15, 1);
- TextDrawSetOutline(Textdraw15, 0);
- TextDrawBackgroundColor(Textdraw15, 51);
- TextDrawFont(Textdraw15, 2);
- TextDrawSetProportional(Textdraw15, 1);
- Textdraw16 = TextDrawCreate(702.719848, 415.825378, "usebox");
- TextDrawLetterSize(Textdraw16, 0.000000, -2.544816);
- TextDrawTextSize(Textdraw16, 369.919860, 0.000000);
- TextDrawAlignment(Textdraw16, 1);
- TextDrawColor(Textdraw16, 0);
- TextDrawUseBox(Textdraw16, true);
- TextDrawBoxColor(Textdraw16, 102);
- TextDrawSetShadow(Textdraw16, 0);
- TextDrawSetOutline(Textdraw16, 0);
- TextDrawFont(Textdraw16, 0);
- Textdraw17 = TextDrawCreate(510.159790, 391.818572, "/");
- TextDrawLetterSize(Textdraw17, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw17, 1);
- TextDrawColor(Textdraw17, -5963521);
- TextDrawSetShadow(Textdraw17, 0);
- TextDrawSetOutline(Textdraw17, 0);
- TextDrawBackgroundColor(Textdraw17, 51);
- TextDrawFont(Textdraw17, 1);
- TextDrawSetProportional(Textdraw17, 1);
- Textdraw18 = TextDrawCreate(649.000000, 398.979919, "usebox");
- TextDrawLetterSize(Textdraw18, 0.000000, -2.464816);
- TextDrawTextSize(Textdraw18, 514.560119, 0.000000);
- TextDrawAlignment(Textdraw18, 1);
- TextDrawColor(Textdraw18, 0);
- TextDrawUseBox(Textdraw18, true);
- TextDrawBoxColor(Textdraw18, 102);
- TextDrawSetShadow(Textdraw18, 0);
- TextDrawSetOutline(Textdraw18, 0);
- TextDrawFont(Textdraw18, 0);
- Textdraw19 = TextDrawCreate(654.479858, 382.507812, "usebox");
- TextDrawLetterSize(Textdraw19, 0.000000, -2.464816);
- TextDrawTextSize(Textdraw19, 519.039978, 0.000000);
- TextDrawAlignment(Textdraw19, 1);
- TextDrawColor(Textdraw19, 0);
- TextDrawUseBox(Textdraw19, true);
- TextDrawBoxColor(Textdraw19, 102);
- TextDrawSetShadow(Textdraw19, 0);
- TextDrawSetOutline(Textdraw19, 0);
- TextDrawFont(Textdraw19, 0);
- Textdraw20 = TextDrawCreate(513.960083, 375.794647, "/");
- TextDrawLetterSize(Textdraw20, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw20, 1);
- TextDrawColor(Textdraw20, -5963521);
- TextDrawSetShadow(Textdraw20, 0);
- TextDrawSetOutline(Textdraw20, 0);
- TextDrawBackgroundColor(Textdraw20, 51);
- TextDrawFont(Textdraw20, 1);
- TextDrawSetProportional(Textdraw20, 1);
- Textdraw21 = TextDrawCreate(517.840087, 359.695953, "/");
- TextDrawLetterSize(Textdraw21, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw21, 1);
- TextDrawColor(Textdraw21, -5963521);
- TextDrawSetShadow(Textdraw21, 0);
- TextDrawSetOutline(Textdraw21, 0);
- TextDrawBackgroundColor(Textdraw21, 51);
- TextDrawFont(Textdraw21, 1);
- TextDrawSetProportional(Textdraw21, 1);
- Textdraw22 = TextDrawCreate(658.239990, 366.454559, "usebox");
- TextDrawLetterSize(Textdraw22, 0.000000, -2.384816);
- TextDrawTextSize(Textdraw22, 522.720092, 0.000000);
- TextDrawAlignment(Textdraw22, 1);
- TextDrawColor(Textdraw22, 0);
- TextDrawUseBox(Textdraw22, true);
- TextDrawBoxColor(Textdraw22, 102);
- TextDrawSetShadow(Textdraw22, 0);
- TextDrawSetOutline(Textdraw22, 0);
- TextDrawFont(Textdraw22, 0);
- Textdraw23 = TextDrawCreate(522.200134, 343.373291, "/");
- TextDrawLetterSize(Textdraw23, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw23, 1);
- TextDrawColor(Textdraw23, -5963521);
- TextDrawSetShadow(Textdraw23, 0);
- TextDrawSetOutline(Textdraw23, 0);
- TextDrawBackgroundColor(Textdraw23, 51);
- TextDrawFont(Textdraw23, 1);
- TextDrawSetProportional(Textdraw23, 1);
- Textdraw24 = TextDrawCreate(526.399780, 346.960174, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw24, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw24, 638.400024, 2.165323);
- TextDrawAlignment(Textdraw24, 1);
- TextDrawColor(Textdraw24, -5963521);
- TextDrawSetShadow(Textdraw24, 0);
- TextDrawSetOutline(Textdraw24, 0);
- TextDrawFont(Textdraw24, 4);
- Textdraw25 = TextDrawCreate(369.160156, 392.312011, "/");
- TextDrawLetterSize(Textdraw25, 0.484239, 2.221227);
- TextDrawAlignment(Textdraw25, 1);
- TextDrawColor(Textdraw25, -5963521);
- TextDrawSetShadow(Textdraw25, 0);
- TextDrawSetOutline(Textdraw25, 0);
- TextDrawBackgroundColor(Textdraw25, 51);
- TextDrawFont(Textdraw25, 1);
- TextDrawSetProportional(Textdraw25, 1);
- Textdraw26 = TextDrawCreate(374.159790, 395.792175, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw26, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw26, 141.600128, 2.389321);
- TextDrawAlignment(Textdraw26, 1);
- TextDrawColor(Textdraw26, -5963521);
- TextDrawSetShadow(Textdraw26, 0);
- TextDrawSetOutline(Textdraw26, 0);
- TextDrawFont(Textdraw26, 4);
- Textdraw27 = TextDrawCreate(378.039886, 399.165283, "////////////////////////////////");
- TextDrawLetterSize(Textdraw27, 0.272239, 1.138560);
- TextDrawAlignment(Textdraw27, 1);
- TextDrawColor(Textdraw27, -5963521);
- TextDrawSetShadow(Textdraw27, 0);
- TextDrawSetOutline(Textdraw27, 0);
- TextDrawBackgroundColor(Textdraw27, 51);
- TextDrawFont(Textdraw27, 1);
- TextDrawSetProportional(Textdraw27, 1);
- Textdraw28 = TextDrawCreate(565.840026, 335.775970, "s~w~peedo");
- TextDrawLetterSize(Textdraw28, 0.361999, 1.226666);
- TextDrawAlignment(Textdraw28, 1);
- TextDrawColor(Textdraw28, -5963521);
- TextDrawSetShadow(Textdraw28, 103);
- TextDrawSetOutline(Textdraw28, 0);
- TextDrawBackgroundColor(Textdraw28, 51);
- TextDrawFont(Textdraw28, 3);
- TextDrawSetProportional(Textdraw28, 1);
- Textdraw29 = TextDrawCreate(430.359924, 385.010589, "n~w~os");
- TextDrawLetterSize(Textdraw29, 0.361999, 1.226666);
- TextDrawAlignment(Textdraw29, 1);
- TextDrawColor(Textdraw29, -5963521);
- TextDrawSetShadow(Textdraw29, 103);
- TextDrawSetOutline(Textdraw29, 0);
- TextDrawBackgroundColor(Textdraw29, 51);
- TextDrawFont(Textdraw29, 3);
- TextDrawSetProportional(Textdraw29, 1);
- Textdraw30 = TextDrawCreate(560.719970, 350.634704, "infernus");
- TextDrawLetterSize(Textdraw30, 0.246799, 1.226666);
- TextDrawAlignment(Textdraw30, 1);
- TextDrawColor(Textdraw30, -5963521);
- TextDrawSetShadow(Textdraw30, 0);
- TextDrawSetOutline(Textdraw30, 0);
- TextDrawBackgroundColor(Textdraw30, 51);
- TextDrawFont(Textdraw30, 2);
- TextDrawSetProportional(Textdraw30, 1);
- Textdraw31 = TextDrawCreate(545.840087, 361.386718, "-");
- TextDrawLetterSize(Textdraw31, 5.266800, 0.285866);
- TextDrawAlignment(Textdraw31, 1);
- TextDrawColor(Textdraw31, -5963521);
- TextDrawSetShadow(Textdraw31, 1);
- TextDrawSetOutline(Textdraw31, 0);
- TextDrawBackgroundColor(Textdraw31, 51);
- TextDrawFont(Textdraw31, 1);
- TextDrawSetProportional(Textdraw31, 1);
- Textdraw32 = TextDrawCreate(526.040039, 365.970733, "speed~w~100 km/h");
- TextDrawLetterSize(Textdraw32, 0.246799, 1.226666);
- TextDrawAlignment(Textdraw32, 1);
- TextDrawColor(Textdraw32, -5963521);
- TextDrawSetShadow(Textdraw32, 0);
- TextDrawSetOutline(Textdraw32, 0);
- TextDrawBackgroundColor(Textdraw32, 51);
- TextDrawFont(Textdraw32, 2);
- TextDrawSetProportional(Textdraw32, 1);
- Textdraw33 = TextDrawCreate(522.560058, 380.261413, "fuel ~w~100%");
- TextDrawLetterSize(Textdraw33, 0.246799, 1.226666);
- TextDrawAlignment(Textdraw33, 1);
- TextDrawColor(Textdraw33, -5963521);
- TextDrawSetShadow(Textdraw33, 0);
- TextDrawSetOutline(Textdraw33, 0);
- TextDrawBackgroundColor(Textdraw33, 51);
- TextDrawFont(Textdraw33, 2);
- TextDrawSetProportional(Textdraw33, 1);
- return 1;
- }
- public NitroBarUpdate(playerid)
- {
- new nitro = GetPVarInt(playerid, "Nitro");
- if(nitro > 0 && nitro < 5) TextDrawSetString(Textdraw26, "/");
- else if(nitro >= 5 && nitro < 10) TextDrawSetString(Textdraw26, "//");
- else if(nitro >= 10 && nitro < 15) TextDrawSetString(Textdraw26, "///");
- else if(nitro >= 15 && nitro < 20) TextDrawSetString(Textdraw26, "////");
- else if(nitro >= 20 && nitro < 25) TextDrawSetString(Textdraw26, "/////");
- else if(nitro >= 25 && nitro < 30) TextDrawSetString(Textdraw26, "//////");
- else if(nitro >= 30 && nitro < 35) TextDrawSetString(Textdraw26, "////////");
- else if(nitro >= 35 && nitro < 40) TextDrawSetString(Textdraw26, "/////////");
- else if(nitro >= 40 && nitro < 45) TextDrawSetString(Textdraw26, "//////////");
- else if(nitro >= 45 && nitro < 50) TextDrawSetString(Textdraw26, "///////////");
- else if(nitro >= 50 && nitro < 55) TextDrawSetString(Textdraw26, "////////////");
- else if(nitro >= 55 && nitro < 60) TextDrawSetString(Textdraw26, "/////////////");
- else if(nitro >= 60 && nitro < 65) TextDrawSetString(Textdraw26, "//////////////");
- else if(nitro >= 65 && nitro < 70) TextDrawSetString(Textdraw26, "///////////////");
- else if(nitro >= 70 && nitro < 75) TextDrawSetString(Textdraw26, "/////////////////");
- else if(nitro >= 75 && nitro < 80) TextDrawSetString(Textdraw26, "///////////////////");
- else if(nitro >= 80 && nitro < 85) TextDrawSetString(Textdraw26, "//////////////////////");
- else if(nitro >= 85 && nitro < 90) TextDrawSetString(Textdraw26, "/////////////////////////");
- else if(nitro >= 90 && nitro < 95) TextDrawSetString(Textdraw26, "////////////////////////////");
- else if(nitro >= 95 && nitro <= 100) TextDrawSetString(Textdraw26,"////////////////////////////////");
- else TextDrawSetString(Textdraw26, "_");
- return 1;
- }
- public RandomMessage()
- {
- TextDrawSetString(Textdraw4, RandomMessages[random(sizeof(RandomMessages))]); // We need this to make the timer working
- return 1;
- }
- public OnGameModeExit()
- {
- for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
- {
- TextDrawDestroy(NitroLabel);
- TextDrawDestroy(NitroAmount[playerid]);
- KillTimer(timer2);
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetPVarInt(playerid, "Nitro", 100);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid,Textdraw0);
- TextDrawShowForPlayer(playerid,Textdraw1);
- TextDrawShowForPlayer(playerid,Textdraw2);
- TextDrawShowForPlayer(playerid,Textdraw3);
- TextDrawShowForPlayer(playerid,Textdraw4);
- TextDrawShowForPlayer(playerid,Textdraw5);
- TextDrawShowForPlayer(playerid,Textdraw6);
- TextDrawShowForPlayer(playerid,Textdraw7);
- TextDrawShowForPlayer(playerid,Textdraw8);
- TextDrawShowForPlayer(playerid,Textdraw9);
- TextDrawShowForPlayer(playerid,Textdraw10);
- TextDrawShowForPlayer(playerid,Textdraw11);
- TextDrawShowForPlayer(playerid,Textdraw12);
- TextDrawShowForPlayer(playerid,Textdraw13);
- TextDrawShowForPlayer(playerid,Textdraw14);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vozilo = GetPlayerVehicleID(playerid);
- if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
- {
- new string[128];
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw15);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw17);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw18);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw19);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw20);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw21);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw22);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw23);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw24);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw25);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw26);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw27);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw28);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw29);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw30);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw31);
- if(oldstate-1 && newstate) TextDrawShowForPlayer(playerid,Textdraw32);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw15);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw16);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw17);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw18);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw19);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw20);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw21);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw22);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw23);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw24);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw25);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw26);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw27);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw28);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw29);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw30);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw31);
- else if(newstate == PLAYER_STATE_DRIVER) TextDrawShowForPlayer(playerid,Textdraw32);
- format(string, sizeof(string), "%s", ImenaVozila[GetVehicleModel(vozilo) - 400]), TextDrawSetString(Textdraw29, string);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new Nitro = GetPVarInt(playerid, "Nitro");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER || !CanUseNitro(GetPlayerVehicleID(playerid))) return false;
- else if ((((newkeys & (4)) == (4)) && ((oldkeys & (4)) != (4))))
- {
- if(Nitro > 0)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- timer1 = SetTimerEx("NosUpdate", 100, true, "d", playerid);
- }
- }
- else if ((((newkeys & (4)) != (4)) && ((oldkeys & (4)) == (4))))
- {
- RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- KillTimer(timer1);
- SetPVarInt(playerid, "Nitro", Nitro);
- }
- return 1;
- }
- public NosUpdate(playerid)
- {
- new Nitro = GetPVarInt(playerid, "Nitro");
- if(Nitro > 0)
- {
- Nitro -= NosConsumSpeed;
- SetPVarInt(playerid, "Nitro", Nitro);
- }
- else if(Nitro <= 0)
- {
- Nitro = 0;
- SetPVarInt(playerid, "Nitro", Nitro);
- RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(!VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
- {
- new sspeed[50];
- format(sspeed, sizeof(sspeed), "Speed: %d KM/H", GetSpeed(playerid));
- TextDrawSetString(Textdraw31, sspeed);
- new Float: Pos[4];
- GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
- }
- }
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement