Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************
- * Speedo Filterscript v1.0 SynoSpeedo *
- * Filterscript Programmer: SynonymousZ *
- ******************************************/
- #include <a_samp>
- new Text:Tacho_Box0;
- new Text:Tacho_Box1;
- new Text:Tacho_KMH[MAX_PLAYERS];
- new Text:Tacho_Box2;
- new Text:Tacho_Zustand[MAX_PLAYERS];
- new Text:Tacho_Tank[MAX_PLAYERS];
- new Text:Tacho_Car[MAX_PLAYERS];
- new VehicleName[][] = {
- "Landstalker",
- "Bravura",
- "Buffalo",
- "Linerunner",
- "Pereniel",
- "Sentinel",
- "Dumper",
- "Feuerwehrwagen",
- "Müllabfuhr",
- "Stretch",
- "Manana",
- "Infernus",
- "Voodoo",
- "Pony",
- "Mule",
- "Cheetah",
- "Ambulance",
- "Leviathan",
- "Moonbeam",
- "Esperanto",
- "Taxi Company",
- "Washington",
- "Bobcat",
- "Mr Whoopee",
- "BF Injection",
- "Hunter",
- "Premier",
- "Enforcer",
- "Securicar",
- "Banshee",
- "Predator",
- "Bus",
- "Panzer",
- "Barracks",
- "Hotknife",
- "Trailer",
- "Previon",
- "Coach",
- "Cabbie",
- "Stallion",
- "Rumpo",
- "RC Bandit",
- "Romero",
- "Packer",
- "Monster Truck",
- "Admiral",
- "Squalo",
- "Seasparrow",
- "Pizzaboy",
- "Tram",
- "Trailer",
- "Turismo",
- "Speeder",
- "Reefer",
- "Tropic",
- "Flatbed",
- "Yankee",
- "Caddy",
- "Solair",
- "Berkley's RC Van",
- "Skimmer",
- "PCJ-600",
- "Roller",
- "Freeway",
- "RC Baron",
- "RC Raider",
- "Glendale",
- "Oceanic",
- "Sanchez",
- "Sparrow",
- "Patriot",
- "Quad",
- "Coastguard",
- "Dinghy",
- "Hermes",
- "Sabre",
- "Rustler",
- "ZR-350",
- "Walton",
- "Regina",
- "Comet",
- "Fahrrad",
- "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",
- "Hotring Racer",
- "Bloodring Banger",
- "Rancher",
- "Super GT",
- "Elegant",
- "Journey",
- "Bike",
- "Mountain Bike",
- "Beagle",
- "Cropdust",
- "Stunt",
- "Tanker",
- "RoadTrain",
- "Nebula",
- "Majestic",
- "Buccaneer",
- "Shamal",
- "Hydra",
- "FCR-900",
- "NRG-500",
- "Polizei-Motorrad",
- "Cement Truck",
- "Tow Truck",
- "Fortune",
- "Cadrona",
- "FBI Truck",
- "Willard",
- "Forklift",
- "Traktor",
- "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 Truck",
- "Monster Truck",
- "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",
- "Emperor",
- "Wayfarer",
- "Euros",
- "Hotdog",
- "Club",
- "Trailer",
- "Trailer",
- "Andromada",
- "Dodo",
- "RC Cam",
- "Launch",
- "Streifenwagen",
- "Streifenwagen",
- "Streifenwagen",
- "Polizei Ranger",
- "Picador",
- "Wasserwerfer",
- "Alpha",
- "Phoenix",
- "Glendale",
- "Sadler",
- "Luggage Trailer",
- "Luggage Trailer",
- "Stair Trailer",
- "Boxville",
- "Farm Plow",
- "Utility Trailer"
- };
- forward SpeedoUpdate();
- public OnFilterScriptInit()
- {
- printf("SpeedoFilterscript: 'SynoSpeedo' wurde erfolgreich geladen!");
- printf("Filterscript Version: 1.0");
- Tacho_Box0 = TextDrawCreate(319.000000, 343.000000, " ");
- TextDrawBackgroundColor(Tacho_Box0, 255);
- TextDrawFont(Tacho_Box0, 1);
- TextDrawLetterSize(Tacho_Box0, 0.500000, 1.000000);
- TextDrawColor(Tacho_Box0, -1);
- TextDrawSetOutline(Tacho_Box0, 0);
- TextDrawSetProportional(Tacho_Box0, 1);
- TextDrawSetShadow(Tacho_Box0, 1);
- TextDrawUseBox(Tacho_Box0, 1);
- TextDrawBoxColor(Tacho_Box0, 255);
- TextDrawTextSize(Tacho_Box0, 85.000000, 0.000000);
- Tacho_Box1 = TextDrawCreate(319.000000, 345.000000, " ");
- TextDrawBackgroundColor(Tacho_Box1, 255);
- TextDrawFont(Tacho_Box1, 1);
- TextDrawLetterSize(Tacho_Box1, 0.500000, 1.400000);
- TextDrawColor(Tacho_Box1, -1);
- TextDrawSetOutline(Tacho_Box1, 0);
- TextDrawSetProportional(Tacho_Box1, 1);
- TextDrawSetShadow(Tacho_Box1, 1);
- TextDrawUseBox(Tacho_Box1, 1);
- TextDrawBoxColor(Tacho_Box1, 255);
- TextDrawTextSize(Tacho_Box1, 309.000000, 0.000000);
- Tacho_Box2 = TextDrawCreate(319.000000, 421.000000, " ");
- TextDrawBackgroundColor(Tacho_Box2, 255);
- TextDrawFont(Tacho_Box2, 1);
- TextDrawLetterSize(Tacho_Box2, 0.500000, 1.000000);
- TextDrawColor(Tacho_Box2, -1);
- TextDrawSetOutline(Tacho_Box2, 0);
- TextDrawSetProportional(Tacho_Box2, 1);
- TextDrawSetShadow(Tacho_Box2, 1);
- TextDrawUseBox(Tacho_Box2, 1);
- TextDrawBoxColor(Tacho_Box2, 255);
- TextDrawTextSize(Tacho_Box2, 83.000000, 0.000000);
- SetTimer("SpeedoUpdate", 1000, 1);
- for(new i = 0; i<MAX_PLAYERS; i++)
- {
- Tacho_KMH[i] = TextDrawCreate(136.000000, 351.000000, " ");
- TextDrawBackgroundColor(Tacho_KMH[i], 255);
- TextDrawFont(Tacho_KMH[i], 1);
- TextDrawLetterSize(Tacho_KMH[i], 0.500000, 1.000000);
- TextDrawColor(Tacho_KMH[i], -1);
- TextDrawSetOutline(Tacho_KMH[i], 0);
- TextDrawSetProportional(Tacho_KMH[i], 1);
- TextDrawSetShadow(Tacho_KMH[i], 1);
- Tacho_Zustand[i] = TextDrawCreate(136.000000, 366.000000, " ");
- TextDrawBackgroundColor(Tacho_Zustand[i], 255);
- TextDrawFont(Tacho_Zustand[i], 1);
- TextDrawLetterSize(Tacho_Zustand[i], 0.500000, 1.000000);
- TextDrawColor(Tacho_Zustand[i], -1);
- TextDrawSetOutline(Tacho_Zustand[i], 0);
- TextDrawSetProportional(Tacho_Zustand[i], 1);
- TextDrawSetShadow(Tacho_Zustand[i], 1);
- Tacho_Tank[i] = TextDrawCreate(138.000000, 381.000000, " ");
- TextDrawBackgroundColor(Tacho_Tank[i], 255);
- TextDrawFont(Tacho_Tank[i], 1);
- TextDrawLetterSize(Tacho_Tank[i], 0.500000, 1.000000);
- TextDrawColor(Tacho_Tank[i], -1);
- TextDrawSetOutline(Tacho_Tank[i], 0);
- TextDrawSetProportional(Tacho_Tank[i], 1);
- TextDrawSetShadow(Tacho_Tank[i], 1);
- Tacho_Car[i] = TextDrawCreate(138.000000, 398.000000, "");
- TextDrawBackgroundColor(Tacho_Car[i], 255);
- TextDrawFont(Tacho_Car[i], 1);
- TextDrawLetterSize(Tacho_Car[i], 0.500000, 1.000000);
- TextDrawColor(Tacho_Car[i], -1);
- TextDrawSetOutline(Tacho_Car[i], 0);
- TextDrawSetProportional(Tacho_Car[i], 1);
- TextDrawSetShadow(Tacho_Car[i], 1);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i = 0; i<MAX_PLAYERS; i++)
- {
- TextDrawHideForAll(Tacho_Box0);
- TextDrawDestroy(Tacho_Box0);
- TextDrawHideForAll(Tacho_Box1);
- TextDrawDestroy(Tacho_Box1);
- TextDrawHideForAll(Tacho_KMH[i]);
- TextDrawDestroy(Tacho_KMH[i]);
- TextDrawHideForAll(Tacho_Box2);
- TextDrawDestroy(Tacho_Box2);
- TextDrawHideForAll(Tacho_Zustand[i]);
- TextDrawDestroy(Tacho_Zustand[i]);
- TextDrawHideForAll(Tacho_Tank[i]);
- TextDrawDestroy(Tacho_Tank[i]);
- TextDrawHideForAll(Tacho_Car[i]);
- TextDrawDestroy(Tacho_Car[i]);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- TextDrawShowForPlayer(playerid, Tacho_Box0);
- TextDrawShowForPlayer(playerid, Tacho_Box1);
- TextDrawShowForPlayer(playerid, Tacho_KMH[playerid]);
- TextDrawShowForPlayer(playerid, Tacho_Box2);
- TextDrawShowForPlayer(playerid, Tacho_Zustand[playerid]);
- TextDrawShowForPlayer(playerid, Tacho_Tank[playerid]);
- TextDrawShowForPlayer(playerid, Tacho_Car[playerid]);
- }
- if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
- {
- TextDrawHideForPlayer(playerid, Tacho_Box0);
- TextDrawHideForPlayer(playerid, Tacho_Box1);
- TextDrawHideForPlayer(playerid, Tacho_KMH[playerid]);
- TextDrawHideForPlayer(playerid, Tacho_Box2);
- TextDrawHideForPlayer(playerid, Tacho_Zustand[playerid]);
- TextDrawHideForPlayer(playerid, Tacho_Tank[playerid]);
- TextDrawHideForPlayer(playerid, Tacho_Car[playerid]);
- }
- return 1;
- }
- public SpeedoUpdate()
- {
- for(new i = 0; i<MAX_PLAYERS; i++)
- {
- new Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,final_speed_int;
- new veh = GetPlayerVehicleID(i);
- GetVehicleVelocity(veh, speed_x, speed_y, speed_z);
- final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*120.0;
- final_speed_int = floatround(final_speed,floatround_round);
- new kmh_anzahl = final_speed_int;
- new kmh[10],zustand[30],tank[10],cars[50];
- format(kmh, 10,"KM/H: %d", kmh_anzahl);
- new Float:hp;
- GetVehicleHealth(GetPlayerVehicleID(i), hp);
- if(hp > 700){format(zustand, 30,"Zustand: ~g~%.0f", hp);}
- if(hp < 700){format(zustand, 30,"Zustand: ~y~%.0f", hp);}
- if(hp < 350){format(zustand, 30,"Zustand: ~r~%.0f", hp);}
- if(hp < 250){format(zustand, 30,"Zustand: ~r~%s", "BOOM");}
- format(tank, 10,"Tank: %d", 100);//Euer Tanksystem einfügen
- format(cars, 50,"Auto: %s", VehicleName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
- TextDrawSetString(Tacho_KMH[i], kmh);
- TextDrawSetString(Tacho_Zustand[i], zustand);
- TextDrawSetString(Tacho_Tank[i], tank);
- TextDrawSetString(Tacho_Car[i], cars);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement