Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- new PlayerText:Textdraw0[MAX_PLAYERS];
- new PlayerText:Textdraw1[MAX_PLAYERS];
- new PlayerText:Textdraw2[MAX_PLAYERS];
- new PlayerText:Textdraw3[MAX_PLAYERS];
- new PlayerText:Textdraw4[MAX_PLAYERS];
- new PlayerText:Textdraw5[MAX_PLAYERS];
- //new PlayerText:Textdraw6[MAX_PLAYERS];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Spidometras By: *Jamaika");
- print(" Kreditus keisti draudziama!");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 630.750000, 362.000030, "usebox");
- PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000000, 7.849999);
- PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 437.375000, 0.000000);
- PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
- PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
- PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);
- Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 463.125000, 350.583343, "Spidometras");
- PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.618749, 1.220833);
- PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw1[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw1[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw1[playerid], 3);
- PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1);
- Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 444.375000, 366.333374, "Greitis");
- PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw2[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1);
- Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 448.750000, 378.000122, "0");
- PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.878125, 2.825000);
- PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw3[playerid], 8388863);
- PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw3[playerid], 3);
- PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);
- Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 521.875000, 377.416778, "Masina: Infernus");
- PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.268124, 1.378332);
- PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw4[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw4[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);
- Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 521.250000, 389.083374, "Bukle: 100");
- PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.348125, 1.168333);
- PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw5[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);
- /*Textdraw6[playerid] = CreatePlayerTextDraw(playerid, 527.500000, 398.416625, "Kuras: 100l");
- PlayerTextDrawLetterSize(playerid, Textdraw6[playerid], 0.274999, 1.319999);
- PlayerTextDrawAlignment(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw6[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw6[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw6[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw6[playerid], 1);*/
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- 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)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- PlayAudioStreamForPlayer(playerid, "http://www.radijas.fm/media/_catalog/www.radijas.fm-radijo-stotis-hot-fm.pls");
- PlayerTextDrawShow(playerid, PlayerText:Textdraw0[playerid]);
- PlayerTextDrawShow(playerid, PlayerText:Textdraw1[playerid]);
- PlayerTextDrawShow(playerid, PlayerText:Textdraw2[playerid]);
- PlayerTextDrawShow(playerid, PlayerText:Textdraw3[playerid]);
- PlayerTextDrawShow(playerid, PlayerText:Textdraw4[playerid]);
- PlayerTextDrawShow(playerid, PlayerText:Textdraw5[playerid]);
- //PlayerTextDrawShow(playerid, PlayerText:Textdraw6[playerid]);
- }
- else if(oldstate == PLAYER_STATE_DRIVER)
- {
- StopAudioStreamForPlayer(playerid);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw0[playerid]);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw1[playerid]);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw2[playerid]);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw3[playerid]);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw4[playerid]);
- PlayerTextDrawHide(playerid, PlayerText:Textdraw5[playerid]);
- //PlayerTextDrawHide(playerid, PlayerText:Textdraw6[playerid]);
- }
- 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)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new string[300];
- new VehicleNames[212][] = {
- "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
- "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
- "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
- "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
- "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
- "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
- "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
- "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
- "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","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","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","Trailer",
- "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
- "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
- "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
- "Stair Trailer","Boxville","Farm Plow","Utility Trailer" };
- format(string,sizeof(string),"%i",MasinosGreitis(playerid));
- PlayerTextDrawSetString(playerid, Textdraw3[playerid], string);
- new vehicleid = GetPlayerVehicleID(playerid);
- new model = GetVehicleModel(vehicleid);
- format(string, sizeof(string), "Masina: %s", VehicleNames[model-400]);
- PlayerTextDrawSetString(playerid, Textdraw4[playerid], string);
- //format(string, sizeof(string), "Kuras: %il", vehicleDB[vehicleid][gas]);
- //PlayerTextDrawSetString(playerid, Textdraw6[playerid], string);
- new Float:vehHealth;
- GetVehicleHealth(vehicleid, vehHealth);
- new vHealth = floatround((vehHealth - 250.0) / 7.5);
- format(string, sizeof(string), "Bukle: %i%%", vHealth);
- PlayerTextDrawSetString(playerid, Textdraw5[playerid], string);
- }
- 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[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- stock MasinosGreitis(playerid)
- {
- new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
- GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
- rtn = floatsqroot(Vx*Vx + Vy*Vy + Vz*Vz);
- return floatround(rtn * 100 * 1.61);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement