Brauche Hilfe bei meinem 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
  • Hallo alle zusammen,
    ich habe eine Seite gefunden ( http://bsndesign.webs.com/ ) und habe eine Frage an euch.
    Wie bearbeite ich meinen Tacho damit, oder was muss ich überhaupt machen ?
    Ich hoffe ihr könnt mir helfen.



    public VehStateCheck()
    {
    for(new i=0;i<MAX_PLAYERS;i++)
    {
    if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(i)))
    {
    if(M_Bot[i][PAFK] == 0)
    {
    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);
    if (health >= 900 && health <= 1000)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~~g~~g~~g~~g~~g~~g~ KM/H~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~g~~h~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,1);
    }
    else if (health >= 600 && health < 900)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~~g~~g~~g~~g~~g~~g~ KM/H~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~g~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,1);
    }
    else if (health >= 380 && health < 600)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~~g~~g~~g~~g~~g~~g~ KM/H~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~y~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,1);
    }
    else if (health >= 0 && health < 380)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~%d~g~~g~~g~~g~~g~~g~~g~ KM/H~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~r~%s",floatround(value/1400),Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,1);
    }
    PCarPos[i][PCarX] = x;
    PCarPos[i][PCarY] = y;
    PCarPos[i][PCarZ] = z;
    }
    }
    }
    return 1;
    }