Beiträge von Julian

    if(strcmp("/admins", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
    for(new i = 0; i < MAX_PLAYERS; i++){
    if(IsPlayerConnected(i)){
    if(PlayerInfo[i][pAdmin] >= 1 && AFKModus[i] == 0){
    if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] < 1338){
    new AdminRangName[25];
    if(PlayerInfo[i][pAdmin] == -1){AdminRangName = "Beschwerdemoderator";}
    if(PlayerInfo[i][pAdmin] == 1){AdminRangName = "Moderator";}
    if(PlayerInfo[i][pAdmin] == 2){AdminRangName = "Supermoderator";}
    if(PlayerInfo[i][pAdmin] == 3){AdminRangName = "Supporter";}
    if(PlayerInfo[i][pAdmin] == 4){AdminRangName = "Administrator";}
    if(PlayerInfo[i][pAdmin] == 5){AdminRangName = "Communitymanager";}
    if(PlayerInfo[i][pAdmin] == 6){AdminRangName = "Fraktionsmanager";}
    if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Headadmin";}
    if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "stellv. Projektleiter";}
    if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Projektleiter";}
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s: %s", AdminRangName, sendername);
    SendClientMessage(playerid, COLOR_GREY, string);
    }}}}}
    else if(PlayerInfo[playerid][pAdmin] != 0){
    SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
    for(new i = 0; i < MAX_PLAYERS; i++){
    if(IsPlayerConnected(i)){
    if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] != 2050){
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string, sizeof(string), "%s [%d]%s", AdminRangName,i, sendername);
    SendClientMessage(playerid, COLOR_GREY, string);
    }}}}}
    return 1;
    }


    Meinst du das so ?

    Guten Tag,


    Meine Fahrzeug Ids buggen wenn man sich ein Fahrzeug mit /veh Spawnt und mit /wegcar löscht.
    Ich hoffe ihr könnt mir helfen das zu fixxen. Hier mein Code:


    if(strcmp("/veh", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] < 10)
    {
    SendClientMessage(playerid, COLOR_KEINADMIN, "*** INFO: Dies ist ein Adminbefehl, du bist kein Admin.");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /veh [Model ID] [Farbe1] [Farbe2]");
    return 1;
    }
    new car;
    car = strval(tmp);
    if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_ERRORTEXT, " Autonummer muss zwischen 400 und 611 sein!"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /veh [Model ID] [Farbe1] [Farbe2]");
    return 1;
    }
    new color1;
    color1 = strval(tmp);
    if(color1 < -1 || color1 > 255) { SendClientMessage(playerid, COLOR_ERRORTEXT, " Die Nummer für eine Autofarbe muss zwischen 0 und 255 sein!"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /veh [Model ID] [Farbe1] [Farbe2]");
    return 1;
    }
    new color2;
    color2 = strval(tmp);
    if(color2 < -1 || color2 > 255) { SendClientMessage(playerid, COLOR_ERRORTEXT, " Die Nummer für eine Autofarbe muss zwischen 0 und 255 sein!"); return 1; }
    if(car == 538)
    {
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Vehicleid 538 ist nicht verfügbar.");
    return 1;
    }
    for(new i = 0; i < 50; i++)
    {
    if(AdminCar[i][ATOOwnerID] == -1)
    {
    new Float:X, Float:Y, Float:Z, Float:Angle;
    GetPlayerFacingAngle(playerid, Angle);
    GetPlayerPos(playerid, X,Y,Z);
    AdminCar[i][ATOOwnerID] = playerid;
    AdminCar[i][ATOCarID] = CreateVehicle(car, X,Y,Z, Angle, color1, color2, 12000);
    SetVehicleVirtualWorld(AdminCar[i][ATOCarID], GetPlayerVirtualWorld(playerid));
    LinkVehicleToInterior(AdminCar[i][ATOCarID], GetPlayerInterior(playerid));
    Gas[AdminCar[i][ATOCarID]] = 100;
    PutPlayerInVehicle(playerid, AdminCar[i][ATOCarID], 0);
    format(string, sizeof(string), "Auto %d wurde gespawnt.", AdminCar[i][ATOCarID]);
    SendClientMessage(playerid, COLOR_GREY, string);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "AdmCmd: %s hat sich ein Auto(ID: %d) gespawnt. Auto: %s", sendername, AdminCar[i][ATOCarID], VehNames[GetVehicleModel(AdminCar[i][ATOCarID])-400]);
    SendAdminMessage(COLOR_YELLOW, 1, string);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(AdminCar[i][ATOCarID],engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(AdminCar[i][ATOCarID],VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
    MotorSystemMotor[AdminCar[i][ATOCarID]] = true;
    format(string,sizeof(string),"%s hat sich ein auto geholt [%s].", sendername,VehNames[GetVehicleModel(AdminCar[i][ATOCarID])-400]);
    EnterToLog("veh",string);
    break;
    }
    }
    }
    return 1;
    }


    //


    if(strcmp("/wegcar", cmd, true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] >= 10)
    {
    for(new i = 0; i < 50; i++)
    {
    if(AdminCar[i][ATOCarID] == GetPlayerVehicleID(playerid))
    {
    AdminCar[i][ATOOwnerID] = -1;
    AdminCar[i][ATOCarID] = -1;
    break;
    }
    }
    StopEngine(playerid,GetPlayerVehicleID(playerid));
    DestroyVehicleSelfmade(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, COLOR_BENUTZETEXT, "Du hast das Fahrzeug erfolgreich gelöscht!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_KEINADMIN, "*** INFO: Dies ist ein Adminbefehl, du bist kein Admin.");
    return 1;
    }
    }
    return 1;
    }