Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Text:Tacho0;
- new Text:Tacho1;
- new Text:Tacho2[MAX_PLAYERS];
- new Text:Tacho3[MAX_PLAYERS];
- new Text:Tacho4[MAX_PLAYERS];
- new Text:Tacho5[MAX_PLAYERS];
- new Text:Tacho6[MAX_PLAYERS];
- new Text:Tacho7[MAX_PLAYERS];
- new Text:Tacho8[MAX_PLAYERS];
- new Text:Tacho9[MAX_PLAYERS];
- new Text:Tacho10[MAX_PLAYERS];
- new Text:Tacho11;
- new Text:Tacho12;
- new Text:Tacho13[MAX_PLAYERS];
- new Text:Tacho14;
- new Text:Tacho15;
- new Text:Tacho16[MAX_PLAYERS];
- new TachoTimer[MAX_PLAYERS];
- stock TachoInit()
- {
- Tacho0 = TextDrawCreate(255.000000, 324.000000, "~n~~n~~n~~n~");
- TextDrawBackgroundColor(Tacho0, 255);
- TextDrawFont(Tacho0, 1);
- TextDrawLetterSize(Tacho0, 0.490000, 2.599998);
- TextDrawColor(Tacho0, -1);
- TextDrawSetOutline(Tacho0, 0);
- TextDrawSetProportional(Tacho0, 1);
- TextDrawSetShadow(Tacho0, 1);
- TextDrawUseBox(Tacho0, 1);
- TextDrawBoxColor(Tacho0, 96);
- TextDrawTextSize(Tacho0, 380.000000, 10.000000);
- TextDrawSetSelectable(Tacho0, 0);
- Tacho1 = TextDrawCreate(261.000000, 328.000000, "~n~~n~~n~~n~");
- TextDrawBackgroundColor(Tacho1, 255);
- TextDrawFont(Tacho1, 1);
- TextDrawLetterSize(Tacho1, 0.490000, 2.399998);
- TextDrawColor(Tacho1, -1);
- TextDrawSetOutline(Tacho1, 0);
- TextDrawSetProportional(Tacho1, 1);
- TextDrawSetShadow(Tacho1, 1);
- TextDrawUseBox(Tacho1, 1);
- TextDrawBoxColor(Tacho1, 144);
- TextDrawTextSize(Tacho1, 373.000000, 10.000000);
- TextDrawSetSelectable(Tacho1, 0);
- Tacho14 = TextDrawCreate(420.000000, 372.000000, "~n~~n~~n~");
- TextDrawBackgroundColor(Tacho14, 255);
- TextDrawFont(Tacho14, 1);
- TextDrawLetterSize(Tacho14, 0.500000, 1.000000);
- TextDrawColor(Tacho14, -1);
- TextDrawSetOutline(Tacho14, 0);
- TextDrawSetProportional(Tacho14, 1);
- TextDrawSetShadow(Tacho14, 1);
- TextDrawUseBox(Tacho14, 1);
- TextDrawBoxColor(Tacho14, 128);
- TextDrawTextSize(Tacho14, 470.000000, 30.000000);
- TextDrawSetSelectable(Tacho14, 0);
- Tacho15 = TextDrawCreate(425.000000, 375.000000, "~n~~n~~n~");
- TextDrawBackgroundColor(Tacho15, 255);
- TextDrawFont(Tacho15, 1);
- TextDrawLetterSize(Tacho15, 0.500000, 0.799999);
- TextDrawColor(Tacho15, -1);
- TextDrawSetOutline(Tacho15, 0);
- TextDrawSetProportional(Tacho15, 1);
- TextDrawSetShadow(Tacho15, 1);
- TextDrawUseBox(Tacho15, 1);
- TextDrawBoxColor(Tacho15, 128);
- TextDrawTextSize(Tacho15, 464.000000, 30.000000);
- TextDrawSetSelectable(Tacho15, 0);
- Tacho11 = TextDrawCreate(161.000000, 376.000000, "~n~~n~~n~");
- TextDrawBackgroundColor(Tacho11, 255);
- TextDrawFont(Tacho11, 1);
- TextDrawLetterSize(Tacho11, 0.500000, 1.000000);
- TextDrawColor(Tacho11, -1);
- TextDrawSetOutline(Tacho11, 0);
- TextDrawSetProportional(Tacho11, 1);
- TextDrawSetShadow(Tacho11, 1);
- TextDrawUseBox(Tacho11, 1);
- TextDrawBoxColor(Tacho11, 128);
- TextDrawTextSize(Tacho11, 211.000000, 0.000000);
- TextDrawSetSelectable(Tacho11, 0);
- Tacho12 = TextDrawCreate(165.000000, 379.000000, "~n~~n~~n~");
- TextDrawBackgroundColor(Tacho12, 255);
- TextDrawFont(Tacho12, 1);
- TextDrawLetterSize(Tacho12, 0.440000, 0.799999);
- TextDrawColor(Tacho12, -1);
- TextDrawSetOutline(Tacho12, 0);
- TextDrawSetProportional(Tacho12, 1);
- TextDrawSetShadow(Tacho12, 1);
- TextDrawUseBox(Tacho12, 1);
- TextDrawBoxColor(Tacho12, 128);
- TextDrawTextSize(Tacho12, 206.000000, 0.000000);
- TextDrawSetSelectable(Tacho12, 0);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- Tacho2[i] = TextDrawCreate(281.000000, 311.000000, "Trashmaster");
- TextDrawBackgroundColor(Tacho2[i], 255);
- TextDrawFont(Tacho2[i], 0);
- TextDrawLetterSize(Tacho2[i], 0.460000, 1.899999);
- TextDrawColor(Tacho2[i], -1);
- TextDrawSetOutline(Tacho2[i], 0);
- TextDrawSetProportional(Tacho2[i], 1);
- TextDrawSetShadow(Tacho2[i], 1);
- TextDrawSetSelectable(Tacho2[i], 0);
- Tacho3[i] = TextDrawCreate(259.000000, 330.000000, "Tank: 100L");
- TextDrawBackgroundColor(Tacho3[i], 255);
- TextDrawFont(Tacho3[i], 1);
- TextDrawLetterSize(Tacho3[i], 0.310000, 1.200000);
- TextDrawColor(Tacho3[i], -1);
- TextDrawSetOutline(Tacho3[i], 0);
- TextDrawSetProportional(Tacho3[i], 1);
- TextDrawSetShadow(Tacho3[i], 1);
- TextDrawSetSelectable(Tacho3[i], 0);
- Tacho4[i] = TextDrawCreate(259.000000, 342.000000, "Tankart: Kerosin");
- TextDrawBackgroundColor(Tacho4[i], 255);
- TextDrawFont(Tacho4[i], 1);
- TextDrawLetterSize(Tacho4[i], 0.310000, 1.200000);
- TextDrawColor(Tacho4[i], -1);
- TextDrawSetOutline(Tacho4[i], 0);
- TextDrawSetProportional(Tacho4[i], 1);
- TextDrawSetShadow(Tacho4[i], 1);
- TextDrawSetSelectable(Tacho4[i], 0);
- Tacho5[i] = TextDrawCreate(258.000000, 355.000000, "Batterie: 12 W");
- TextDrawBackgroundColor(Tacho5[i], 255);
- TextDrawFont(Tacho5[i], 1);
- TextDrawLetterSize(Tacho5[i], 0.310000, 1.200000);
- TextDrawColor(Tacho5[i], -1);
- TextDrawSetOutline(Tacho5[i], 0);
- TextDrawSetProportional(Tacho5[i], 1);
- TextDrawSetShadow(Tacho5[i], 1);
- TextDrawSetSelectable(Tacho5[i], 0);
- Tacho6[i] = TextDrawCreate(259.000000, 368.000000, "Geschw.: 100 Km/h");
- TextDrawBackgroundColor(Tacho6[i], 255);
- TextDrawFont(Tacho6[i], 1);
- TextDrawLetterSize(Tacho6[i], 0.310000, 1.200000);
- TextDrawColor(Tacho6[i], -1);
- TextDrawSetOutline(Tacho6[i], 0);
- TextDrawSetProportional(Tacho6[i], 1);
- TextDrawSetShadow(Tacho6[i], 1);
- TextDrawSetSelectable(Tacho6[i], 0);
- Tacho7[i] = TextDrawCreate(260.000000, 381.000000, "Km: 1000.2");
- TextDrawBackgroundColor(Tacho7[i], 255);
- TextDrawFont(Tacho7[i], 1);
- TextDrawLetterSize(Tacho7[i], 0.310000, 1.200000);
- TextDrawColor(Tacho7[i], -1);
- TextDrawSetOutline(Tacho7[i], 0);
- TextDrawSetProportional(Tacho7[i], 1);
- TextDrawSetShadow(Tacho7[i], 1);
- TextDrawSetSelectable(Tacho7[i], 0);
- Tacho8[i] = TextDrawCreate(260.000000, 398.000000, "[~r~Tuer~w~]");
- TextDrawBackgroundColor(Tacho8[i], 255);
- TextDrawFont(Tacho8[i], 1);
- TextDrawLetterSize(Tacho8[i], 0.259999, 1.299999);
- TextDrawColor(Tacho8[i], -1);
- TextDrawSetOutline(Tacho8[i], 0);
- TextDrawSetProportional(Tacho8[i], 1);
- TextDrawSetShadow(Tacho8[i], 1);
- TextDrawSetSelectable(Tacho8[i], 0);
- Tacho9[i] = TextDrawCreate(300.000000, 398.000000, "[~g~Licht~w~]");
- TextDrawBackgroundColor(Tacho9[i], 255);
- TextDrawFont(Tacho9[i], 1);
- TextDrawLetterSize(Tacho9[i], 0.280000, 1.299999);
- TextDrawColor(Tacho9[i], -1);
- TextDrawSetOutline(Tacho9[i], 0);
- TextDrawSetProportional(Tacho9[i], 1);
- TextDrawSetShadow(Tacho9[i], 1);
- TextDrawSetSelectable(Tacho9[i], 0);
- Tacho10[i] = TextDrawCreate(342.000000, 398.000000, "[~r~Motor~w~]");
- TextDrawBackgroundColor(Tacho10[i], 255);
- TextDrawFont(Tacho10[i], 1);
- TextDrawLetterSize(Tacho10[i], 0.239999, 1.299999);
- TextDrawColor(Tacho10[i], -1);
- TextDrawSetOutline(Tacho10[i], 0);
- TextDrawSetProportional(Tacho10[i], 1);
- TextDrawSetShadow(Tacho10[i], 1);
- TextDrawSetSelectable(Tacho10[i], 0);
- Tacho13[i] = TextDrawCreate(167.000000, 383.000000, "1000 m");
- TextDrawBackgroundColor(Tacho13[i], 255);
- TextDrawFont(Tacho13[i], 1);
- TextDrawLetterSize(Tacho13[i], 0.280000, 1.400000);
- TextDrawColor(Tacho13[i], -1);
- TextDrawSetOutline(Tacho13[i], 0);
- TextDrawSetProportional(Tacho13[i], 1);
- TextDrawSetShadow(Tacho13[i], 1);
- TextDrawSetSelectable(Tacho13[i], 0);
- Tacho16[i] = TextDrawCreate(426.000000, 373.000000, "~r~Stop");
- TextDrawBackgroundColor(Tacho16[i], 255);
- TextDrawFont(Tacho16[i], 1);
- TextDrawLetterSize(Tacho16[i], 0.490000, 2.699999);
- TextDrawColor(Tacho16[i], -1);
- TextDrawSetOutline(Tacho16[i], 0);
- TextDrawSetProportional(Tacho16[i], 1);
- TextDrawSetShadow(Tacho16[i], 1);
- TextDrawSetSelectable(Tacho16[i], 0);
- }
- return 1;
- }
- forward ShowTacho(playerid, VehicleID);
- public ShowTacho(playerid, VehicleID) {
- if(IsPlayerInAnyVehicle(playerid)) {
- new Float:FahrzeugLeben, string[1024], car = GetPlayerVehicleID(playerid);
- GetVehicleHealth(car, FahrzeugLeben);
- format(string, sizeof(string), "%s", VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
- TextDrawSetString(Tacho2[playerid],string);
- format(string, sizeof(string), "Tank: %dL", Tank[car]);
- TextDrawSetString(Tacho3[playerid],string);
- format(string, sizeof(string), "Tankart: %s", TankTyp(car));
- TextDrawSetString(Tacho4[playerid],string);
- format(string, sizeof(string), "Batterie: %d W", Batterie[car]);
- TextDrawSetString(Tacho5[playerid],string);
- format(string, sizeof(string), "Geschw.: %d Km/h", GetVehicleSpeed(car));
- TextDrawSetString(Tacho6[playerid],string);
- format(string, sizeof(string), "Km: %d Km", Km[car]);
- TextDrawSetString(Tacho7[playerid],string);
- if(Locked[car] == true) {
- TextDrawSetString(Tacho8[playerid], "[~g~Tuer~w~]");
- } else {
- TextDrawSetString(Tacho8[playerid], "[~r~Tuer~w~]");
- }
- if(Licht[car] == true) {
- TextDrawSetString(Tacho9[playerid], "[~g~Licht~w~]");
- } else {
- TextDrawSetString(Tacho9[playerid], "[~r~Licht~w~]");
- }
- if(Motor[car] == true) {
- TextDrawSetString(Tacho10[playerid], "[~g~Motor~w~]");
- } else {
- TextDrawSetString(Tacho10[playerid], "[~r~Motor~w~]");
- }
- if(IsAFlyVeh(car))
- {
- new Float:VehiclePos[3];
- GetVehiclePos(car, VehiclePos[0], VehiclePos[1], VehiclePos[2]);
- format(string, sizeof(string), "%d", floatround(VehiclePos[2]));
- TextDrawSetString(Tacho13[playerid], string);
- }
- }
- else {
- TextDrawHideForPlayer(playerid, Tacho0);
- TextDrawHideForPlayer(playerid, Tacho1);
- TextDrawHideForPlayer(playerid, Tacho2[playerid]);
- TextDrawHideForPlayer(playerid, Tacho3[playerid]);
- TextDrawHideForPlayer(playerid, Tacho4[playerid]);
- TextDrawHideForPlayer(playerid, Tacho5[playerid]);
- TextDrawHideForPlayer(playerid, Tacho6[playerid]);
- TextDrawHideForPlayer(playerid, Tacho7[playerid]);
- TextDrawHideForPlayer(playerid, Tacho8[playerid]);
- TextDrawHideForPlayer(playerid, Tacho9[playerid]);
- TextDrawHideForPlayer(playerid, Tacho10[playerid]);
- TextDrawHideForPlayer(playerid, Tacho11);
- TextDrawHideForPlayer(playerid, Tacho12);
- TextDrawHideForPlayer(playerid, Tacho13[playerid]);
- KillTimer(TachoTimer[playerid]);
- }
- return 1;
- }
- //OnPlayerStateChange
- new CarModelID = GetVehicleModel(GetPlayerVehicleID(playerid));
- if(CarModelID==481||CarModelID==509||CarModelID==510)
- {
- return 1;
- }
- TachoTimer[playerid]=SetTimerEx("ShowTacho", 200, 1, "ii", playerid, GetPlayerVehicleID(playerid));
- TextDrawShowForPlayer(playerid, Tacho0);
- TextDrawShowForPlayer(playerid, Tacho1);
- TextDrawShowForPlayer(playerid, Tacho2[playerid]);
- TextDrawShowForPlayer(playerid, Tacho3[playerid]);
- TextDrawShowForPlayer(playerid, Tacho4[playerid]);
- TextDrawShowForPlayer(playerid, Tacho5[playerid]);
- TextDrawShowForPlayer(playerid, Tacho6[playerid]);
- TextDrawShowForPlayer(playerid, Tacho7[playerid]);
- TextDrawShowForPlayer(playerid, Tacho8[playerid]);
- TextDrawShowForPlayer(playerid, Tacho9[playerid]);
- TextDrawShowForPlayer(playerid, Tacho10[playerid]);
- TextDrawShowForPlayer(playerid, Tacho11);
- TextDrawShowForPlayer(playerid, Tacho12);
- if(IsAFlyVeh(GetPlayerVehicleID(playerid)))
- {
- TextDrawShowForPlayer(playerid, Tacho13[playerid]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement