FBI Cars erstellen geht nicht | noch nicht erledigt ist i-wie bug

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 liebe Community,


    hate mir grad mal ne neue FBI Base gemacht und wollte dann auch endlich mal eiegen cars ....
    hab dann bischen um script rumgeguckt und hatte es auch ziemlich schnell drauf aber ich bekam immer volgenden Error


    C:\Users\MSI\Desktop\WorldOfRedApple.pwn(5001) : error 012: invalid function call, not a valid address
    C:\Users\MSI\Desktop\WorldOfRedApple.pwn(5001) : warning 215: expression has no effect
    C:\Users\MSI\Desktop\WorldOfRedApple.pwn(5001) : error 001: expected token: ";", but found ")"
    C:\Users\MSI\Desktop\WorldOfRedApple.pwn(5001) : error 029: invalid expression, assumed zero
    C:\Users\MSI\Desktop\WorldOfRedApple.pwn(5001) : fatal error 107: too many error messages on one line


    Die Error zeilen :
    else if(FBICar(playerid))
    Die Ganze Funktion :
    public OnPlayerStateChange(playerid, newstate, oldstate) // - Führerschein
    {
    if(newstate == 2)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new teps = GetVehicleBarCar(vehicleid);
    if(IstFahrCar(playerid))
    {
    if(GetPlayerFraktion(playerid, 5) || Fahrstunde[playerid] == 1) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für Fahrlehrer und Fahrschüler. "); RemovePlayerFromVehicle(playerid); return 1; }
    }
    else if(IstHitmanCar(playerid))
    {
    if(GetPlayerFraktion(playerid, 6)) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für Hitmans. "); RemovePlayerFromVehicle(playerid); return 1; }
    }
    else if(IstMedicCar(playerid))
    {
    if(GetPlayerFraktion(playerid, 4)) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für Sanitäter. "); RemovePlayerFromVehicle(playerid); return 1; }
    }
    else if(CopCar(playerid))
    {
    if(GetPlayerFraktion(playerid, 2)) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für Polizisten. "); RemovePlayerFromVehicle(playerid); return 1; }
    }
    else if(FBICar(playerid))
    {
    if(GetPlayerFraktion(playerid, 3)) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für FBI"); RemovePlayerFromVehicle(playerid); return 1; }
    }


    else if(teps != -1)
    {
    new string[256];
    Woof[playerid] = vehicleid;
    WooX[playerid] = teps;
    TogglePlayerControllable(playerid, 0);
    SetVehicleParamsForAll(vehicleid, 0, 1);
    SendClientMessage(playerid, COLOR_YELLOW2, "*°----- Autoverkaufsstelle -----°*");
    format(string, sizeof(string), "** Name: ° %s °", VehicleBar[teps][cName]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "** Preis: ° $%d °",VehicleBar[teps][cPreis]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "** Reperatur: ° $%d °",VehicleBar[teps][cRepair]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "** Treibstoff: ° %s °",VehicleBar[teps][cTreibstoff]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), "**-----------------------------------**");
    SendClientMessage(playerid, COLOR_YELLOW2, string);
    SendClientMessage(playerid, COLOR_WHITE, " Wenn du dieses Auto kaufen willst, tippe '/car buy' ein. Wenn nicht /car exit ");
    }
    }
    return 1;
    }
    So und das habe ich gemacht das man nur FBI's rein können :
    forward IstFBICar(playerid);
    ,
    new FBICar[12];
    ,
    FBICar[0] = AddStaticVehicleEx(528,299.55523682,-1185.02832031,81.09906006,289.99511719,-1,-1,15); //FBI Truck
    FBICar[1] = AddStaticVehicleEx(528,297.59973145,-1182.49694824,81.09906006,289.99511719,-1,-1,15); //FBI Truck
    FBICar[2] = AddStaticVehicleEx(528,295.18118286,-1179.84643555,81.09906006,289.99505615,-1,-1,15); //FBI Truck
    FBICar[3] = AddStaticVehicleEx(601,286.52746582,-1160.59057617,80.84010315,223.99475098,-1,-1,15); //S.W.A.T. Van
    FBICar[4] = AddStaticVehicleEx(601,282.89688110,-1163.82934570,80.84426880,223.99475098,-1,-1,15); //S.W.A.T. Van
    FBICar[5] = AddStaticVehicleEx(601,289.81542969,-1156.92077637,80.84010315,223.99475098,-1,-1,15); //S.W.A.T. Van
    FBICar[6] = AddStaticVehicleEx(425,278.20611572,-1179.03759766,86.00790405,0.00000000,-1,-1,15); //Hunter
    FBICar[7] = AddStaticVehicleEx(469,270.51235962,-1165.68139648,89.99466705,312.00000000,2,2,15); //Sparrow
    FBICar[8] = AddStaticVehicleEx(427,291.01028442,-1174.49780273,81.16206360,288.00000000,-1,-1,15); //Enforcer
    FBICar[9] = AddStaticVehicleEx(427,293.26452637,-1177.29833984,81.16206360,289.99658203,-1,-1,15); //Enforcer
    FBICar[10] = AddStaticVehicleEx(523,287.91043091,-1149.54418945,80.57027435,225.99987793,-1,-1,15); //HPV1000
    FBICar[11] = AddStaticVehicleEx(523,288.78796387,-1148.94677734,80.57027435,225.99993896,-1,-1,15); //HPV1000
    dann unter public OnPlayerStateChange
    else if(FBICar(playerid))
    {
    if(GetPlayerFraktion(playerid, 3)) { return 1; }
    else { SendClientMessage(playerid, COLOR_RED, " Nur für FBI"); RemovePlayerFromVehicle(playerid); return 1; }
    }
    und
    public IstFBICar(playerid)
    {
    new carid = GetPlayerVehicleID(playerid);
    if(carid == FBICar[0] || carid == FBICar[1] || carid == FBICar[2] || carid == FBICar[3] || carid == FBICar[4] || carid == FBICar[5] || carid == FBICar[6] || carid == FBICar[7] || carid == FBICar[8] || carid == FBICar[9] || carid == FBICar[10] || carid == FBICar[11])
    { return 1; }
    else { return 0; }
    }