Suche Tacho

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • post mal die zeilen
    ps: F_SpeedoMeter ist garnicht so schlecht


  • // Timer
    SetTimer("VehStateCheck",300,1);


    // Fahrzeug Namen


    new VehicleName[][] = {
    "Landstalker",
    "Bravura",
    "Buffalo",
    "Linerunner",
    "Pereniel",
    "Sentinel",
    "Dumper",
    "Firetruck",
    "Trashmaster",
    "Stretch",
    "Manana",
    "Infernus",
    "Voodoo",
    "Pony",
    "Mule",
    "Cheetah",
    "Ambulance",
    "Leviathan",
    "Moonbeam",
    "Esperanto",
    "Taxi",
    "Washington",
    "Bobcat",
    "Eiswagen",
    "BF Injection",
    "Hunter",
    "Premier",
    "Enforcer",
    "Securicar",
    "Banshee",
    "Predator",
    "Bus",
    "Rhino",
    "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",
    "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 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(LS)",
    "Streifenwagen(SF)",
    "Streifenwagen(LV)",
    "Polizei Ranger",
    "Picador",
    "S.W.A.T. Van",
    "Alpha",
    "Phoenix",
    "Glendale",
    "Sadler",
    "Luggage Trailer",
    "Luggage Trailer",
    "Stair Trailer",
    "Boxville",
    "Farm Plow",
    "Utility Trailer"
    };


    // Callback


    forward VehStateCheck();
    public VehStateCheck()
    {
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if (GetPlayerState(i) == PLAYER_STATE_DRIVER && IsPlayerConnected(i))
    {
    new Float:health,vehicleid = GetPlayerVehicleID(i),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(i, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[i][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[i][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[i][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    pSpeed[i] = floatround(value/1400);
    if (health >= 800 && health <= 1000)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~g~~h~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 600 && health < 800)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~g~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 301 && health < 600)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~y~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 0 && health < 301)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~ KM/H~n~~w~%d ~b~/~w~ 100~r~ Benzin~n~~r~%s",floatround(value/1400),Gas[vehicleid],VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }


    PCarPos[i][PCarX] = x;
    PCarPos[i][PCarY] = y;
    PCarPos[i][PCarZ] = z;
    }
    }
    return 1;
    }






    So der sieht genauso aus wie der den du da hast.

  • C:\Dokumente und Einstellungen\Andreas\Desktop\Abc.pwn(1) : fatal error 100: cannot read from file: ""


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    //EDIT


    Des 2:


    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(2) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(226) : error 017: undefined symbol "MAX_PLAYERS"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(228) : error 017: undefined symbol "GetPlayerState"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(230) : error 017: undefined symbol "GetPlayerVehicleID"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(231) : error 017: undefined symbol "GetPlayerPos"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : warning 217: loose indentation
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : error 017: undefined symbol "floatsqroot"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : warning 215: expression has no effect
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : error 001: expected token: ";", but found "]"
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Andreas\Desktop\F_SpeedoMeter.pwn(232) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    9 Errors.

    Einmal editiert, zuletzt von dennis_budu ()