/ofpark

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
  • Ja Hallo,


    ich hab mir heute mal ein /ofpark gescriptet aber das Oamt kann ja nicht in die Cars rein...


    Aber wie mache ich das sie drinne bleiben bei /oaufbrechen...


    if(strcmp("/ofpark",cmdtext,true)==0)
    {
    new vehi;
    new modelstring[45],xstring[45], ystring[45], zstring[45], anglestring[45];
    new Float:vehx, Float:vehy, Float:vehz;
    new vehmodel;
    new platestring[8];
    new Float:vehangle;
    vehi = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(vehi, vehangle);
    vehmodel = GetVehicleModel(vehi);
    GetVehiclePos(vehi, vehx, vehy, vehz);
    if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
    {
    SendClientMessage(playerid, COLOR_GREY, " An deinem Abschleppwagen ist kein Auto angehängt!");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24)
    {
    for(new i = 0; i < sizeof(PDCars); i++)
    {
    if(vehi == PDCars[i])
    {
    RemovePlayerFromVehicle(playerid);
    DestroyVehicle(PDCars[i]);
    PDCars[i] = CreateVehicle(vehmodel, vehx, vehy, vehz+0.5, vehangle, 79, 1, 900);
    format(platestring, sizeof(platestring), "SAPD %i", i);
    SetVehicleNumberPlate(PDCars[i],platestring);
    fCarparkInfo[1] [i] [ModelId] = vehmodel;
    fCarparkInfo[1] [i] [ParkX] = vehx;
    fCarparkInfo[1] [i] [ParkY] = vehy;
    fCarparkInfo[1] [i] [ParkZ] = vehz;
    fCarparkInfo[1] [i] [ParkAngle] = vehangle;


    format(modelstring,sizeof(modelstring), "Car%i_Model",i);
    dini_IntSet("SAPDCars.ini",modelstring,fCarparkInfo[1] [i] [ModelId]);


    format(xstring,sizeof(xstring), "Car%i_X",i);
    dini_FloatSet("SAPDCars.ini",xstring,fCarparkInfo[1] [i] [ParkX]);


    format(ystring,sizeof(ystring), "Car%i_Y",i);
    dini_FloatSet("SAPDCars.ini",ystring,fCarparkInfo[1] [i] [ParkY]);


    format(zstring,sizeof(zstring), "Car%i_Z",i);
    dini_FloatSet("SAPDCars.ini",zstring,fCarparkInfo[1] [i] [ParkZ]);


    format(anglestring,sizeof(anglestring), "Car%i_Angle",i);
    dini_FloatSet("SAPDCars.ini",anglestring,fCarparkInfo[1] [i] [ParkAngle]);
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 24 || PlayerInfo[playerid][pMember] == 24)
    {
    for(new i = 0; i < sizeof(SFCars); i++)
    {
    if(vehi == SFCars[i])
    {
    RemovePlayerFromVehicle(playerid);
    DestroyVehicle(SFCars[i]);
    SFCars[i] = CreateVehicle(vehmodel, vehx, vehy, vehz+0.5, vehangle, 79, 1, 900);
    format(platestring, sizeof(platestring), "SAPD %i", i);
    SetVehicleNumberPlate(SFCars[i],platestring);


    fCarparkInfo[1] [i] [ModelId] = vehmodel;
    fCarparkInfo[1] [i] [ParkX] = vehx;
    fCarparkInfo[1] [i] [ParkY] = vehy;
    fCarparkInfo[1] [i] [ParkZ] = vehz;
    fCarparkInfo[1] [i] [ParkAngle] = vehangle;


    format(modelstring,sizeof(modelstring), "Car%i_Model",i);
    dini_IntSet("SFPDCars.ini",modelstring,fCarparkInfo[1] [i] [ModelId]);


    format(xstring,sizeof(xstring), "Car%i_X",i);
    dini_FloatSet("SFPDCars.ini",xstring,fCarparkInfo[1] [i] [ParkX]);


    format(ystring,sizeof(ystring), "Car%i_Y",i);
    dini_FloatSet("SFPDCars.ini",ystring,fCarparkInfo[1] [i] [ParkY]);


    format(zstring,sizeof(zstring), "Car%i_Z",i);
    dini_FloatSet("SFPDCars.ini",zstring,fCarparkInfo[1] [i] [ParkZ]);


    format(anglestring,sizeof(anglestring), "Car%i_Angle",i);
    dini_FloatSet("SFPDCars.ini",anglestring,fCarparkInfo[1] [i] [ParkAngle]);
    }
    }
    }


    Wie mache ich das nun?


    LG

    Einmal editiert, zuletzt von SenTiZz ()