Beiträge von .SleY

    if(strcmp("/teles", cmdtext, true) == 0) {
    ShowPlayerDialog(playerid,DIALOG_TELES, DIALOG_STYLE_LIST,"Alle-Teleports","/ls\n/lv\n/sf","Auswählen","Abbrechen");
    return 1;
    }

    so`?

    if(GetVehicleHealth(vid) > 250)
    {
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor abgeschaltet. ");
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor wird gestartet.. ");
    }
    }
    }

    also so ?


    if(strcmp(cmd, "/engine",true) == 0)
    {
    if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}Fahrräder haben {FF0000}keinen{FFFFFF} Motor ...");
    return 1;
    }
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vehicle = GetPlayerVehicleID(playerid);
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(Gas[vehicle] == 0) {
    ShowInfoDialog(playerid,"Information","Dein Fahrzeug hat kein Benzin mehr!");
    return 1;
    }
    if(GetVehicleHealth(vid == 250))
    {
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor abgeschaltet. ");
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor wird gestartet.. ");
    }
    }
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~r~Motorschaden!", 2000, 5);
    SendClientMessage(playerid,COLOR_GRAD1,"Dein Fahrzeug hat einen Motorschaden! Rufe einen Mechaniker! ");
    }
    return 1;
    }

    Hallo, ich brauche hilfe bei meinem Motorschaden system.. Undzwa, wenn ein Vehicle dann Repariert wird, und wieder 1000 HP hat, steht da immernoch das es Motorschaden hat.
    Hier mal bischen Code


    new Motorschaden[MAX_VEHICLES];


    public OnVehicleDeath(vehicleid,killerid)
    {
    new Float:PosCar[3];
    GetVehiclePos(vehicleid,PosCar[0],PosCar[1],PosCar[2]);
    SetVehicleToRespawn(vehicleid);
    SetVehiclePos(vehicleid,PosCar[0],PosCar[1],PosCar[2]);
    SetVehicleHealth(vehicleid,299);
    Motorschaden[vehicleid] = 1;
    return 1;
    }


    if(strcmp(cmd, "/engine",true) == 0)
    {
    if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}Fahrräder haben {FF0000}keinen{FFFFFF} Motor ...");
    return 1;
    }
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new vehicle = GetPlayerVehicleID(playerid);
    new vid = GetPlayerVehicleID(playerid);
    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(Gas[vehicle] == 0) {
    ShowInfoDialog(playerid,"Information","Dein Fahrzeug hat kein Benzin mehr!");
    return 1;
    }
    if(Motorschaden[vid] == 0)
    {
    if(vid != INVALID_VEHICLE_ID)
    {
    if(engine == VEHICLE_PARAMS_ON)
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor abgeschaltet. ");
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1," Motor wird gestartet.. ");
    }
    }
    }
    else
    {
    SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~r~Motorschaden!", 2000, 5);
    SendClientMessage(playerid,COLOR_GRAD1,"Dein Fahrzeug hat einen Motorschaden! Rufe einen Mechaniker! ");
    }
    return 1;
    }
    if(strcmp(cmd, "/repair", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pJob] != 7)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist kein KFZ Mechaniker!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /repair [playerid] [Preis]");
    return 1;
    }
    new playa;
    new money;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    money = strval(tmp);
    if(money < 1 || money > 450) { SendClientMessage(playerid, COLOR_GREY, " Der Preis darf nicht unter 1$ oder über 450$ liegen!"); return 1; }
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
    {
    if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, " Du kannst dein eigenes Auto nicht Reparieren!"); return 1; }
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du hast %s die Reparatur seines Wagens für $%d angeboten .",giveplayer,money);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* KFZ-Mechaniker %s bietet dir eine Reparatur deines Wagens für $%d an, (gib /accept repair) ein um anzunehmen.",sendername,money);
    SendClientMessage(playa, COLOR_LIGHTBLUE, string);
    RepairOffer[playa] = playerid;
    RepairPrice[playa] = money;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist nicht in deiner Nähe / nicht in seinem Wagen.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline.");
    }
    }
    }
    return 1;
    }
    Hoffe ihr könnt mir helfen, das es klappt.. :)