Beiträge von xRev92

    [size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
    TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
    }
    return 1;
    }[size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
    TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
    }
    return 1;
    }[size=10]public OnPlayerStateChange(playerid, newstate, oldstate)[/size]
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw4[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw5[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw7[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw9[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw10[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw11[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw12[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw13[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw14[playerid]);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
    TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw2[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw5[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw7[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw9[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw10[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw11[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw12[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw13[playerid]);
    TextDrawHideForPlayer(playerid,Textdraw14[playerid]);
    }
    return 1;
    }


    Keiner eine Idee? :(

    Hier werden sie erstellt:



    AddStaticVehicleEx(553,1806.6000000,-2414.8999000,15.8000000,178.0000000,140,146,15); //Nevada
    AddStaticVehicleEx(553,1838.1000000,-2415.1001000,15.8000000,178.0000000,140,146,15); //Nevada
    AddStaticVehicleEx(553,1725.0000000,-2413.0000000,15.8000000,178.0000000,140,146,15); //Nevada
    AddStaticVehicleEx(553,1645.8000000,-2414.6001000,15.8000000,178.0000000,140,146,15); //Nevada
    AddStaticVehicleEx(553,1565.6000000,-2413.3000000,15.8000000,180.0000000,140,146,15); //Nevada
    AddStaticVehicleEx(553,1482.8000000,-2409.6001000,21.2000000,180.0000000,140,146,15); //Nevada


    Hier OnPlayerEnterVehicle:



    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    if(GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 510)
    {
    GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    }
    else
    {
    SendClientMessage(playerid,TUERKIS,"Der Motor wird mit /m gestartet. Die Lichter startest du mit /l.");
    }
    return 1;
    }

    if(PlayerDaten[playerid][Tutpart] == 6)
    {
    ClearChat();
    SendClientMessage(playerid,ROT,"|--------------------------------------------------------------------------------------------|");
    SendClientMessage(playerid,WEISS,"Du hast das Tutorial erfolgreich beendet.");
    SendClientMessage(playerid,WEISS,"Wenn noch offene Fragen da sind, kannst du sie per /support stellen.");
    SendClientMessage(playerid,WEISS,"Ein Administrator oder Supporter wird dir die Frage schnell beantworten.");
    SendClientMessage(playerid,WEISS,"Das gesamte Team wünscht dir Viel Spaß auf dem Server.");
    SendClientMessage(playerid,ROT,"|--------------------------------------------------------------------------------------------|");
    SetPlayerVirtualWorld(playerid,0);
    SetTimerEx("TutTimer",15000,false,"i",playerid);
    TextDrawShowForPlayer(playerid,Einweisung1);
    TextDrawShowForPlayer(playerid,Einweisung2);
    TextDrawShowForPlayer(playerid,Einweisung3);
    SetTimerEx("Einweisung",10000,false,"i",playerid);
    SpawnPlayer(playerid);
    ClearChat();
    TogglePlayerControllable(playerid,1);
    return 1;
    }
    return 1;
    }


    public Einweisung(playerid)
    {
    TextDrawHideForPlayer(playerid,Einweisung1);
    TextDrawHideForPlayer(playerid,Einweisung2);
    TextDrawHideForPlayer(playerid,Einweisung3);
    }

    Update:[pwn]public TachoTimer(playerid)
    {


    if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) && !IsPlayerNPC(playerid))
    {
    new Float:Entfernung, Float:Geschwindigkeit;
    GetVehiclePos(GetPlayerVehicleID(playerid), X1[playerid], Y1[playerid], Z1[playerid]);
    Entfernung = floatsqroot(floatpower(floatabs(floatsub(X1[playerid], X2[playerid])), 2)+floatpower(floatabs(floatsub(Y1[playerid], Y2[playerid])), 2)+floatpower(floatabs(floatsub(Z1[playerid], Z2[playerid])), 2)); //Berechnung der Entfernung
    Geschwindigkeit = (Entfernung / (TACHOTIMER/1000)) * 3.6; //Meter/Sekunde in Kilometer/Stunde
    new Tachostring[20]; // definiert den String
    format(Tachostring, sizeof(Tachostring), "Km/H: %d", floatround(Geschwindigkeit));
    PlayerTextDrawSetString(playerid,Textdraw[1][playerid], Tachostring);
    GetVehiclePos(GetPlayerVehicleID(playerid), X2[playerid], Y2[playerid], Z2[playerid]);
    new Fahrzeugstring[128];
    CheckHealth(playerid);
    format(Fahrzeugstring,sizeof(Fahrzeugstring),"~b~%s",Fahrzeugname[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    PlayerTextDrawSetString(playerid,Textdraw[0][playerid], Fahrzeugstring);
    for(new t = 0; t < 15; t++) PlayerTextDrawShow(playerid, Textdraw[t][playerid]);
    }
    else for(new t = 0; t < 15; t++) PlayerTextDrawHide(playerid,Textdraw[t][playerid]);
    return 1;
    }[/pwn]


    unter OnPlayerConnect wird das TextDraw erstellt.

    Hallo,
    ich habe ein Problem mit meinem Tacho:
    Undzwar wenn ich alleine auf dem Server bin, wird die kM/H-Anzeige ganz normal angezeigt.
    Sobald ein zweiter Spieler connected, buggt die total rum, und zeigt komische Sachen an( sie springt von 100 auf 10 und so weiter..)
    Hoffe einer kann mir helfen
    MFG