Adac Hilfe

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
  • Hi, ich bin dabei mir ein ADAC reinzuscripten, nur leider habe ich ein kleines problem. /accept adac funktioniert nicht. Vielleicht kann mir von euch einer weiterhelfen


    Jobduty:
    else if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    {
    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
    }


    dutybefehl:
    else if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    {
    if(JobDuty[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist jetzt Off Duty.");
    JobDuty[playerid] = 0;
    Mechanics -= 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du bist On Duty als Mechaniker");
    JobDuty[playerid] = 1;
    Mechanics += 1;
    }
    }


    /service adac
    else if(strcmp(x_nr,"adac",true) == 0)
    {
    if(Mechanics < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " There are no Car Mechanics On Duty at the moment, try again later !");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept mechanic to accept the call)", sendername);
    SendFamilyMessage(13, TEAM_AZTECAS_COLOR, string);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Car Mechanic, wait for a reply.");
    MechanicCall = playerid;
    return 1;
    }


    /accept adac
    else if(strcmp(x_nr,"adac",true) == 0)
    {
    if(Mechanics < 1)
    {
    SendClientMessage(playerid, COLOR_GREY, " There are no Car Mechanics On Duty at the moment, try again later !");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "** %s is in need of a Car Mechanic. (use /accept adac to accept the call)", sendername);
    SendFamilyMessage(13, TEAM_AZTECAS_COLOR, string);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Car Mechanic, wait for a reply.");
    MechanicCall = playerid;
    return 1;
    }


    /refill + /repair
    if(strcmp(cmd, "/refill", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp) &&
    PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13)
    {
    new playa;
    new money;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    money = strval(tmp);
    if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); 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, " Can't do that!"); return 1; }
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du hast %s angeboten sein Auto für $%d zu tanken .",giveplayer,money);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Mechaniker %s will dein Auto für $%d tanken, (tippe /accept refill) um zu akzeptieren.",sendername,money);
    SendClientMessage(playa, COLOR_LIGHTBLUE, string);
    RefillOffer[playa] = playerid;
    RefillPrice[playa] = money;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is not near you / not in a car.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is offline.");
    }
    }
    return 1;
    }
    }
    if(strcmp(cmd, "/repair", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp) &&
    PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13)
    {
    new playa;
    new money;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    money = strval(tmp);
    if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); 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 das nicht machen!"); return 1; }
    GetPlayerName(playa, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du hast %s angeboten sein Auto für $%d zu reparieren .",giveplayer,money);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Mechaniker %s will dein Auto für $%d reparieren, (tippe /accept repair) um zu akzeptieren.",sendername,money);
    SendClientMessage(playa, COLOR_LIGHTBLUE, string);
    RepairOffer[playa] = playerid;
    RepairPrice[playa] = money;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is not near you / not in a car.");
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is offline.");
    }
    }
    return 1;
    }
    }


    Wo liegt der Fehler? Ein Fehler is mir aufgefallen, wenn ich ingame /accept adac mache kommt: You are not a Car Mechanic und darunter Server unknown Command!


    Bitte hilfe,
    danke

    "I'd rather be hated for who I am, than loved for who I am not" , Kurt Cobain

  • bei mir heißt auch Polizei Polizei und Adac Adac ist doch egal