Du hast keinen Schlüssel für dieses Auto Leader/Member

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
  • public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_WASTED)
    {
    if(WantedLevel[playerid] >= 1)
    {
    new price = WantedLevel[playerid] * 2000;
    new string[150];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IstPolizist(i) && CrimInRange(70.0, playerid,i))
    {
    format(string, sizeof(string), "~w~Verbrecher getötet ~g~$%d", price);
    GameTextForPlayer(i, string, 5000, 1);
    PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
    }
    }
    }
    }
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
    if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    return 1;
    }
    TextDrawShowForPlayer(playerid,SpeedoBox);
    TextDrawShowForPlayer(playerid,SpeedoVehText);
    TextDrawShowForPlayer(playerid,TachoAnzeige);
    TextDrawShowForPlayer(playerid,SpeedoVeh[playerid]);
    TextDrawShowForPlayer(playerid,SpeedoKMHText);
    TextDrawShowForPlayer(playerid,SpeedoKMH[playerid]);
    TextDrawShowForPlayer(playerid,SpeedoTankText);
    TextDrawShowForPlayer(playerid,SpeedoTank[playerid]);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
    TextDrawHideForPlayer(playerid,TachoAnzeige);
    TextDrawHideForPlayer(playerid,SpeedoBox);
    TextDrawHideForPlayer(playerid,SpeedoVehText);
    TextDrawHideForPlayer(playerid,SpeedoVeh[playerid]);
    TextDrawHideForPlayer(playerid,SpeedoKMHText);
    TextDrawHideForPlayer(playerid,SpeedoKMH[playerid]);
    TextDrawHideForPlayer(playerid,SpeedoTankText);
    TextDrawHideForPlayer(playerid, SpeedoTank[playerid]);
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new typ;
    typ=IsAutohausCar(vehicleid);
    if(typ!=-1)
    {
    new string[228];
    TogglePlayerControllable(playerid,0);
    Spectating[playerid][0]=typ;
    SetVehicleParamsForAll(vehicleid,0,1);
    format(string, sizeof(string), "{FF3C00}Autohaus\n\n{FFEB00}Fahrzeug: {EFEBEF}%s\n{FFEB00}Preis: {EFEBEF}%d\n{FFEB00}Reparaturkosten: {EFEBEF}%d\n\n{EFEBEF}Möchten sie sich dieses Fahrzeug kaufen?", Kaufliste[typ][Name],Kaufliste[typ][Preis],Kaufliste[typ][Reparatur]);
    ShowPlayerDialog(playerid,DIALOG_AUTOKAUFEN,DIALOG_STYLE_MSGBOX,"Autohaus",string,"Kaufen","Abbrechen");
    }
    }
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(RentRollers); i++)
    {
    if(GetPlayerVehicleID(playerid)==RentRollers[i])
    {
    if(RentRoller[playerid] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    return 1;
    }