Beiträge von Lukaz


    stock VehicleTuning(playerid, slot)
    {
    if(IsValidVehicle(PrivateVehicle[playerid][slot][vehID]))
    {
    GetVehicleParamsEx(PrivateVehicle[playerid][slot][vehID], engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(PrivateVehicle[playerid][slot][vehID], VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);


    if(Vehicle[PrivateVehicle[playerid][slot][vehID]][vehMotor])KillTimer(Vehicle[PrivateVehicle[playerid][slot][vehID]][VehicleTimer]);


    Vehicle[PrivateVehicle[playerid][slot][vehID]][vehMotor] = false;
    Vehicle[PrivateVehicle[playerid][slot][vehID]][vehLicht] = false;
    Vehicle[PrivateVehicle[playerid][slot][vehID]][vehHaube] = false;
    Vehicle[PrivateVehicle[playerid][slot][vehID]][vehKRaum] = false;


    new playerName[MAX_PLAYER_NAME+1], nPlate[32], cutName[24+1];
    GetPlayerName(playerid, playerName, sizeof(playerName));
    strmid(cutName, playerName, 0, 1, sizeof(cutName));
    format(nPlate, sizeof(nPlate), "{B22222}SA %s %d", cutName, PrivateVehicle[playerid][slot][vehID]);


    SetVehicleNumberPlate(PrivateVehicle[playerid][slot][vehID], nPlate);
    LinkVehicleToInterior(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehInterior]);
    SetVehicleVirtualWorld(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehWorld]);


    if(PrivateVehicle[playerid][slot][vehPaintjob] >= 0)ChangeVehiclePaintjob(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehPaintjob]);
    if(PrivateVehicle[playerid][slot][vehColor1] >= 0 || PrivateVehicle[playerid][slot][vehColor2] >= 0) ChangeVehicleColor(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehColor1], PrivateVehicle[playerid][slot][vehColor2]);
    if(PrivateVehicle[playerid][slot][vehSpoiler] >= 1000){ AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehSpoiler]); }
    if(PrivateVehicle[playerid][slot][vehHood] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehHood]); }
    if(PrivateVehicle[playerid][slot][vehRoof] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehRoof]); }
    if(PrivateVehicle[playerid][slot][vehSideskirt] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehSideskirt]); }
    if(PrivateVehicle[playerid][slot][vehLamps] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehLamps]); }
    if(PrivateVehicle[playerid][slot][vehNitro] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehNitro]); }
    if(PrivateVehicle[playerid][slot][vehExhaust] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehExhaust]); }
    if(PrivateVehicle[playerid][slot][vehWheels] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehWheels]); }
    if(PrivateVehicle[playerid][slot][vehStereo] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehStereo]); }
    if(PrivateVehicle[playerid][slot][vehHydraulics] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehHydraulics]); }
    if(PrivateVehicle[playerid][slot][vehFrontBumper] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehFrontBumper]); }
    if(PrivateVehicle[playerid][slot][vehRearBumper] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehRearBumper]); }
    if(PrivateVehicle[playerid][slot][vehVentRight] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehVentRight]); }
    if(PrivateVehicle[playerid][slot][vehVentLeft] >= 1000) { AddVehicleComponent(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehVentLeft]); }


    switch(PrivateVehicle[playerid][slot][vehNeonID])
    {
    case 1: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Blau
    case 2: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Grün
    case 3: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Weiß
    case 4: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Pink
    case 5: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Gelb
    case 6: {PrivateVehicle[playerid][slot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); PrivateVehicle[playerid][slot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon1], PrivateVehicle[playerid][slot][vehID], -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(PrivateVehicle[playerid][slot][vehNeon2], PrivateVehicle[playerid][slot][vehID], 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Rot
    }
    SetVehiclePos(PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehPosX], PrivateVehicle[playerid][slot][vehPosY], PrivateVehicle[playerid][slot][vehPosZ]);
    SetTimerEx("SetVehicleZAngle", 5000, 0, "dd", PrivateVehicle[playerid][slot][vehID], PrivateVehicle[playerid][slot][vehPosA]);
    }
    return 1;
    }


    //Edit fail

    Die AttachDynamicObjectToVehicle waren noch mitten im Switch, das sollte der Grund für die Fehler sein.



    stock fVehicleTuning(fV)
    {
    new nPlate[32];


    if(IsValidVehicle(fVehicle[fV][vehID]))
    {
    GetVehicleParamsEx(fVehicle[fV][vehID], engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(fVehicle[fV][vehID], VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);


    if(Vehicle[fVehicle[fV][vehID]][vehMotor])KillTimer(Vehicle[fVehicle[fV][vehID]][VehicleTimer]);


    Vehicle[fVehicle[fV][vehID]][vehMotor] = false;
    Vehicle[fVehicle[fV][vehID]][vehLicht] = false;
    Vehicle[fVehicle[fV][vehID]][vehHaube] = false;
    Vehicle[fVehicle[fV][vehID]][vehKRaum] = false;


    format(nPlate, sizeof(nPlate), "{B22222}%s %d", GetFraktionNumberPlate(fVehicle[fV][vehFraktion]), fVehicle[fV][vehID]);
    SetVehicleNumberPlate(fVehicle[fV][vehID], nPlate);


    LinkVehicleToInterior(fVehicle[fV][vehID], fVehicle[fV][vehInterior]);
    SetVehicleVirtualWorld(fVehicle[fV][vehID], fVehicle[fV][vehWorld]);


    if(fVehicle[fV][vehPaintjob] >= 0)ChangeVehiclePaintjob(fVehicle[fV][vehID], fVehicle[fV][vehPaintjob]);
    if(fVehicle[fV][vehColor1] >= 0 || fVehicle[fV][vehColor2] >= 0)ChangeVehicleColor(fVehicle[fV][vehID], fVehicle[fV][vehColor1], fVehicle[fV][vehColor2]);
    if(fVehicle[fV][vehSpoiler] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehSpoiler]);
    if(fVehicle[fV][vehHood] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehHood]);
    if(fVehicle[fV][vehRoof] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehRoof]);
    if(fVehicle[fV][vehSideskirt] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehSideskirt]);
    if(fVehicle[fV][vehLamps] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehLamps]);
    if(fVehicle[fV][vehNitro] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehNitro]);
    if(fVehicle[fV][vehExhaust] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehExhaust]);
    if(fVehicle[fV][vehWheels] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehWheels]);
    if(fVehicle[fV][vehStereo] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehStereo]);
    if(fVehicle[fV][vehHydraulics] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehHydraulics]);
    if(fVehicle[fV][vehFrontBumper] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehFrontBumper]);
    if(fVehicle[fV][vehRearBumper] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehRearBumper]);
    if(fVehicle[fV][vehVentRight] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehVentRight]);
    if(fVehicle[fV][vehVentLeft] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehVentLeft]);


    switch(fVehicle[fV][vehNeonID])
    {
    case 1: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Blau
    case 2: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Grün
    case 3: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Weiß
    case 4: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Pink
    case 5: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Gelb
    case 6: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Rot
    }
    if(fVehicle[fV][vehSiren] == 1)
    {
    if(fVehicle[fV][vehFraktion] == 3)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(11701, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], 0.000000, 0.000000, 0.829999, 0.000000, 0.000000, 0.000000);
    }
    }
    else if(fVehicle[fV][vehFraktion] == 6)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(11701, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], 0.000000, 0.000000, 0.829999, 0.000000, 0.000000, 0.000000);
    }
    }
    else if(fVehicle[fV][vehFraktion] == 1)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(19620, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren2] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren3] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren4] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren5] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], -0.00160, 0.05440, 0.83080, 0.00000, 0.00000, 0.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren2], fVehicle[fV][vehID], 0.73560, 2.59780, -0.13790, 0.00000, 0.00000, 178.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren3], fVehicle[fV][vehID], 0.73560, 2.59780, -0.24890, 0.00000, 0.00000, 178.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren4], fVehicle[fV][vehID], -0.72440, 2.59780, -0.13990, 4.00000, 0.00000, 185.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren5], fVehicle[fV][vehID], -0.72440, 2.59780, -0.25090, 4.00000, 0.00000, 185.00000);
    }
    }
    }
    SetVehiclePos(fVehicle[fV][vehID], fVehicle[fV][vehPosX], fVehicle[fV][vehPosY], fVehicle[fV][vehPosZ]);
    SetTimerEx("SetVehicleZAngle", 5000, 0, "dd", fVehicle[fV][vehID], fVehicle[fV][vehPosA]);
    }
    return 1;
    }

    bei dir ist die Fahrzeug ID Variable nicht vehicleid sondern fV.



    stock fVehicleTuning(fV)
    {
    new nPlate[32];


    if(IsValidVehicle(fVehicle[fV][vehID]))
    {
    GetVehicleParamsEx(fVehicle[fV][vehID], engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(fVehicle[fV][vehID], VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);


    if(Vehicle[fVehicle[fV][vehID]][vehMotor])KillTimer(Vehicle[fVehicle[fV][vehID]][VehicleTimer]);


    Vehicle[fVehicle[fV][vehID]][vehMotor] = false;
    Vehicle[fVehicle[fV][vehID]][vehLicht] = false;
    Vehicle[fVehicle[fV][vehID]][vehHaube] = false;
    Vehicle[fVehicle[fV][vehID]][vehKRaum] = false;

    format(nPlate, sizeof(nPlate), "{B22222}%s %d", GetFraktionNumberPlate(fVehicle[fV][vehFraktion]), fVehicle[fV][vehID]);
    SetVehicleNumberPlate(fVehicle[fV][vehID], nPlate);

    LinkVehicleToInterior(fVehicle[fV][vehID], fVehicle[fV][vehInterior]);
    SetVehicleVirtualWorld(fVehicle[fV][vehID], fVehicle[fV][vehWorld]);

    if(fVehicle[fV][vehPaintjob] >= 0)ChangeVehiclePaintjob(fVehicle[fV][vehID], fVehicle[fV][vehPaintjob]);
    if(fVehicle[fV][vehColor1] >= 0 || fVehicle[fV][vehColor2] >= 0)ChangeVehicleColor(fVehicle[fV][vehID], fVehicle[fV][vehColor1], fVehicle[fV][vehColor2]);
    if(fVehicle[fV][vehSpoiler] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehSpoiler]);
    if(fVehicle[fV][vehHood] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehHood]);
    if(fVehicle[fV][vehRoof] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehRoof]);
    if(fVehicle[fV][vehSideskirt] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehSideskirt]);
    if(fVehicle[fV][vehLamps] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehLamps]);
    if(fVehicle[fV][vehNitro] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehNitro]);
    if(fVehicle[fV][vehExhaust] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehExhaust]);
    if(fVehicle[fV][vehWheels] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehWheels]);
    if(fVehicle[fV][vehStereo] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehStereo]);
    if(fVehicle[fV][vehHydraulics] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehHydraulics]);
    if(fVehicle[fV][vehFrontBumper] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehFrontBumper]);
    if(fVehicle[fV][vehRearBumper] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehRearBumper]);
    if(fVehicle[fV][vehVentRight] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehVentRight]);
    if(fVehicle[fV][vehVentLeft] >= 1000)AddVehicleComponent(fVehicle[fV][vehID], fVehicle[fV][vehVentLeft]);


    switch(fVehicle[fV][vehNeonID])
    {
    case 1: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0);} //Rot
    case 2: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0);} //Blau
    case 3: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0);} //Grün
    case 4: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0);} //Gelb
    case 5: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0);} //Pink
    case 6: {fVehicle[fV][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[fV][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0);} //Weiß
    AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon1], fV, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehNeon2], fV, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);
    }
    if(fVehicle[fV][vehSiren] == 1)
    {
    if(fVehicle[fV][vehFraktion] == 3)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(11701, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], 0.000000, 0.000000, 0.829999, 0.000000, 0.000000, 0.000000);
    }
    }
    else if(fVehicle[fV][vehFraktion] == 6)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(11701, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], 0.000000, 0.000000, 0.829999, 0.000000, 0.000000, 0.000000);
    }
    }
    else if(fVehicle[fV][vehFraktion] == 1)
    {
    if(GetVehicleModel(fVehicle[fV][vehID]) == 560)
    {
    fVehicle[fV][vehSiren1] = CreateDynamicObject(19620, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren2] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren3] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren4] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    fVehicle[fV][vehSiren5] = CreateDynamicObject(19797, 0, 0, 0, 0, 0, 0, 0);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren1], fVehicle[fV][vehID], -0.00160, 0.05440, 0.83080, 0.00000, 0.00000, 0.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren2], fVehicle[fV][vehID], 0.73560, 2.59780, -0.13790, 0.00000, 0.00000, 178.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren3], fVehicle[fV][vehID], 0.73560, 2.59780, -0.24890, 0.00000, 0.00000, 178.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren4], fVehicle[fV][vehID], -0.72440, 2.59780, -0.13990, 4.00000, 0.00000, 185.00000);
    AttachDynamicObjectToVehicle(fVehicle[fV][vehSiren5], fVehicle[fV][vehID], -0.72440, 2.59780, -0.25090, 4.00000, 0.00000, 185.00000);
    }
    }
    }
    SetVehiclePos(fVehicle[fV][vehID], fVehicle[fV][vehPosX], fVehicle[fV][vehPosY], fVehicle[fV][vehPosZ]);
    SetTimerEx("SetVehicleZAngle", 5000, 0, "dd", fVehicle[fV][vehID], fVehicle[fV][vehPosA]);
    }
    return 1;
    }

    Nein ich meine wo du die Neonröhren erstellen lässt und am Auto anbringst.


    Diese Funktion also der Ganze Befehl wenn du es beim Motorstart hast oder die Funktion wenn du es mit dem Fahrzeug laden lässt also das ganze wo du die Errors hast.



    //Neon anbringen (Optional beim Motorstart)
    switch(fVehicle[vehicleid][vehNeonID])
    {
    case 1: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Rot
    case 2: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Blau
    case 3: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Grün
    case 4: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Gelb
    case 5: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Pink
    case 6: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Weiß
    }

    Einfach abfragen ob es die Waffen ID 23 wenn ja return 1;



    if(weaponid == 23)return 1;



    if(slot != -1 && gettime() > Spieler[playerid][pAcPause][AC_WEAPON_PAUSE])
    {
    if(Spieler[playerid][pAdmin] < 1)
    {
    new antiweapammo = Spieler[playerid][pAnticheatWeapAmmo][slot],antiweap = Spieler[playerid][pAnticheatWeap][slot];


    if((weaponid != 0 && weaponid != 46 || weaponid != 46 && weaponid != 0) && Spieler[playerid][pSpawned] == 1)
    {
    if(antiweap != weaponid && weaponammo > 0)
    {
    if(weaponid == 23)return 1;

    format(string, sizeof(string), "%s wurde vom Server gebannt, Grund: Waffenhack", GetName(playerid));
    SendClientMessageToAll(COLOR_RED, string);
    SendClientMessage(playerid, COLOR_RED, "* Du wurdest soeben gebannt. Bitte erstelle einen Entbannantrag im Forum, wenn dieser Bann zu Unrecht war!");Spieler[playerid][pBanned] = 1;
    Spieler[playerid][pBanned] = 1;
    format(Spieler[playerid][pBanReason], 64, "Waffenhack");
    format(Spieler[playerid][pBanAdmin], MAX_PLAYER_NAME, "Server");
    KickEx(playerid);
    }
    }
    if(antiweapammo > weaponammo && antiweapammo > 0 && weaponammo > 0)
    {
    Spieler[playerid][pAnticheatWeapAmmo][slot] = weaponammo;
    }
    }
    }
    return 1;
    }

    Also so sollte es gehen wo lässt du das Neon erstellen beim Fahrzeug erstellen oder beim Motorstart, je nach dem Zeig mal den Befehl oder die Funktion.



    //Neon anbringen (Optional beim Motorstart)
    switch(fVehicle[vehicleid][vehNeonID])
    {
    case 1: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Rot
    case 2: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Blau
    case 3: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Grün
    case 4: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Gelb
    case 5: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Pink
    case 6: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Weiß
    }


    //Wenn das Fahrzeug neu Spawnt
    public OnVehicleSpawn(vehicleid)
    {
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon1])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon1]);}
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon2])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon2]);}
    return 1;
    }


    //Das Fahrzeug löschen
    stock DestroyVehicleEx(vehicleid)
    {
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon1])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon1]);}
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon2])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon2]);}


    DestroyVehicle(vehicleid);
    return 1;
    }

    Wenn du es direkt im Switch willst mach es so.



    switch(fVehicle[vehicleid][vehNeonID])
    {
    case 1: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Rot
    case 2: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Blau
    case 3: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Grün
    case 4: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Gelb
    case 5: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Pink
    case 6: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0); AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);} //Weiß
    }

    Ich habe einfach mal mein Script deinen Variablen angepasst, ich empfehle dir das Neon beim Motorstart anzubringen.



    //Neon anbringen (Optional beim Motorstart)
    switch(fVehicle[vehicleid][vehNeonID])
    {
    case 1: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0);} //Rot
    case 2: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0);} //Blau
    case 3: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0);} //Grün
    case 4: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0);} //Gelb
    case 5: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0);} //Pink
    case 6: {fVehicle[vehicleid][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0); fVehicle[vehicleid][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0);} //Weiß
    }
    AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon1], vehicleid, -0.8, 0.0, -0.50, 0.0, 0.0, 0.0);
    AttachDynamicObjectToVehicle(fVehicle[vehicleid][vehNeon2], vehicleid, 0.8, 0.0, -0.50, 0.0, 0.0, 0.0);


    //Wenn das Fahrzeug neu Spawnt
    public OnVehicleSpawn(vehicleid)
    {
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon1])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon1]);}
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon2])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon2]);}
    return 1;
    }


    //Das Fahrzeug löschen
    stock DestroyVehicleEx(vehicleid)
    {
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon1])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon1]);}
    if(IsValidDynamicObject(fVehicle[vehicleid][vehNeon2])) {DestroyDynamicObject(fVehicle[vehicleid][vehNeon2]);}


    DestroyVehicle(vehicleid);
    return 1;
    }

    Ich habe den String noch nicht gesetzt jetzt sollte es gehen.


    Beispiel:

    format(string, sizeof(string),"%s\n%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", GetAdminName(cache_get_field_content_int(i, "Admin")), name, pDay, pMonth, pYear, pHour, pMinute, pSecond);
    zu
    format(string, sizeof(string),"%s\n%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", string, GetAdminName(cache_get_field_content_int(i, "Admin")), name, pDay, pMonth, pYear, pHour, pMinute, pSecond);



    #define isnull(%1) \
    ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))


    forward GetAdmins(playerid);


    public GetAdmins(playerid)
    {
    new String[1024], BenutzerName[MAX_PLAYER_NAME], Jahr, Monat, Tag, Stunde, Minute, Sekunde;


    mysql_query(MySQL, "SELECT * FROM `Accounts` WHERE Admin > '0' AND Admin < '6' ORDER BY `Admin` DESC", true);


    for(new i=0;i<cache_num_rows();i++)
    {
    cache_get_field_content(i, "Name", BenutzerName, myCon, MAX_PLAYER_NAME);
    TimestampToDate(cache_get_field_content_int(i, "LastLogin"), Jahr, Monat, Tag, Stunde, Minute, Sekunde, 1, 0);


    if(isnull(String))
    {
    if(cache_get_field_content_int(i, "playerOnline") == 0)
    {
    format(String, sizeof(String),"Team-Mitglied\tStatus\tLetzte Aktivität\n\%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", GetAdminName(cache_get_field_content_int(i, "Admin")), BenutzerName, Tag, Monat, Jahr, Stunde, Minute, Sekunde);
    }
    else if(cache_get_field_content_int(i, "playerOnline") == 1)
    {
    format(String, sizeof(String),"Team-Mitglied\tStatus\tLetzte Aktivität\n\%s %s\tOnline\t-", GetAdminName(cache_get_field_content_int(i, "Admin")), BenutzerName);
    }
    }
    else
    {
    if(cache_get_field_content_int(i, "playerOnline") == 0)
    {
    format(String, sizeof(String),"%s\n\%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", String, GetAdminName(cache_get_field_content_int(i, "Admin")), BenutzerName, Tag, Monat, Jahr, Stunde, Minute, Sekunde);
    }
    else if(cache_get_field_content_int(i, "playerOnline") == 1)
    {
    format(String, sizeof(String),"%s\n\%s %s\tOnline\t-", String, GetAdminName(cache_get_field_content_int(i, "Admin")), BenutzerName);
    }
    }
    }
    ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_TABLIST_HEADERS, "Team-Mitglieder", String, "Schließen", "");
    return 1;
    }


    //Edit jetzt geht es, und mit der Methode sollte es auch ohne Public gehen.


    @Speezy

    Ich habe das ganze nicht getestet aber so sollte es gehen ob der Spieler ein Admin ist könntest du im MySQL query auch abfragen



    //Definier das oben im Script damit kannst du abfragen ob ein String leer ist
    #define isnull(%1) \
    ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))


    forward GetAdmins(playerid);


    public GetAdmins(playerid)
    {
    new String[512], header[128], adminrang, name[MAX_PLAYER_NAME], online, OnlineString[32], pYear, pMonth, pDay, pHour, pMinute, pSecond, lastlogin;


    adminrang = cache_get_field_content_int(i, "Admin");
    lastlogin = cache_get_field_content_int(i, "LastLogin");
    cache_get_field_content(i, "Name", name, myCon, MAX_PLAYER_NAME);


    for(new i=0;i<cache_num_rows();i++)
    {
    if(adminrang > 0 && adminrang < 6)
    {
    TimestampToDate(lastlogin, pYear, pMonth, pDay, pHour, pMinute, pSecond, 1, 0);
    online = cache_get_field_content_int(i, "playerOnline");


    if(isnull(String))
    {
    if(online == 0)
    {
    format(string, sizeof(string),""COLOR_HEX_WHITE"Team-Mitglied\tStatus\tLetzte Aktivität\n%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", GetAdminName(adminrang), name, pDay, pMonth, pYear, pHour, pMinute, pSecond);
    }
    else if(online == 1)
    {
    format(string, sizeof(string),""COLOR_HEX_WHITE"Team-Mitglied\tStatus\tLetzte Aktivität\n%s %s\tOnline\t-", GetAdminName(adminrang), name);
    }
    }
    else
    {
    if(online == 0)
    {
    format(String, sizeof(String),"%s\n%s %s\tOffline\t%02d.%02d.%02d - %02d:%02d:%02d", GetAdminName(adminrang), name, pDay, pMonth, pYear, pHour, pMinute, pSecond);
    }
    else if(online == 1)
    {
    format(String, sizeof(String),"%s\n%s %s\tOnline\t-", String, GetAdminName(adminrang), name);
    }
    }
    }
    }
    ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_TABLIST_HEADERS, "Team-Mitglieder", string, "Schließen", "");
    return 1;
    }


    @Speezy

    Du musst nicht 2 Strings erstellen einer reicht, die Variable ob der Spieler gebannt ist solltest du zur Sicherheit vor den Kick Timer setzen.
    Den ban kannst du unter OnPlayerConnect oder in deiner Benutzer Lade Funktion Abfragen, wichtig ist das du die Daten Speicherst per MySQL oder Ini.



    ocmd:ban(playerid, params[])
    {
    new pID, Grund[64], String[128];

    if(!IsPlayerGM(playerid,2))return 1;
    if(sscanf(params, "us[64]", pID, Grund))return SendClientMessage(playerid, FARBE_ROT, "INFO: /ban [Playerid] [Grund]");
    if(!IsPlayerConnected(pID))return SendClientMessage(playerid, FARBE_ROT, "Diese Spieler ist nicht online.");
    if(pID == playerid)return SendClientMessage(playerid, FARBE_ROT, "Du kannst dich nicht selber Bannen!");


    format(String, sizeof(String),"Du wurdest von %s vom Server gebannt.Grund: %s.", getPlayerName(playerid), Grund);
    SendClientMessage(pID, FARBE_ROT, String);


    format(String, sizeof(String),"Sollte dieser Ban unberechtigt sein, stelle bitte einen Antrag auf Entbannung im Forum!");
    SendClientMessage(pID, FARBE_ROT, String);


    SetPVarInt(pID, "Gebannt", 1);
    sInfo[playerid][Gebannt] = pID;


    SetTimerEx("KickTimer", 500, false, "i", pID);
    return 1;
    }


    public KickTimer(playerid)
    {
    Kick(pID);
    return 1;
    }


    sry wenn ich die Variable "sInfo[playerid][Gebannt]" falsch zugeordnet habe ich weis nicht genau wofür diese steht.


    @xPatrick

    Du kannst es auch so machen, die Variable playerid wird in deinen SekundenTimer erst garnicht genutzt.
    die Schleife machst du am besten mit MAX_PLAYERS und einer abfrage ob der Spieler Connected ist anstatt GetPlayerPoolSize dann sollte es gehen.


    1.) Erstell eine neue Variable "BusTimer"


    2.) Entfern den Timer "SetTimer("SekundenTimer", 1000, 1);"


    3.) Entferne die Schleife aus dem Public und lass den Timer beenden



    4.) Wenn der Spieler den Checkpoint erreicht startest du den Timer per SetTimerEx


    So wird nur abgefragt ob das Fahrzeug erstellt ist ob jemand drin ist und ob es abgeschleppt ist.



    //Respawnallcars
    command(respawnallcars, playerid, params[])
    {
    #pragma unused params
    new string[128];

    if(SpielerInfo[playerid][pAdminlevel] < 3)return SendClientMessage(playerid,COLOR_RED,"Du bist kein Administrator oder dein Administratorenlevel ist zu niedrig!");
    if(GetPVarInt(playerid, "Adminduty") < 1)return SendClientMessage(playerid, COLOR_RED, "Du musst erst als Admin im Einsatz sein, um diesen Befehl nutzen zu können.");

    for(new i=0;i<MAX_VEHICLES;i++)
    {
    if(IsValidVehicle(i))
    {
    if(!IsVehicleEmpty(i))
    {
    if(Abgeschlepptt[i] == 0)
    {
    SetVehicleToRespawn(i);
    }
    }
    }
    }
    format(string, sizeof(string), "* %s %s[%d] hat alle unbenutzen Fahrzeuge respawned.", GetPlayerAdminRank(playerid),GetName(playerid),playerid);
    SendClientMessageToAllEx(COLOR_LIGHTRED, string);
    return 1;
    }