[FRAGE: Nummernschild für die jeweilige Fraktion ?]

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
  • Guten Abend,
    ich wollte mal gerne wissen ob einer vill weiss wie ich das so hinbekomme das ich z.B.
    Für die LSPD Fahrzeuge das Nummernschild [GTA:LSPD] Benutze und für Fbi das Nummernschild [GTA:FBI] benutze.
    Weiss einer wie ich das im Script einbaue ?


    SA-MP Zeit: Since Juni - 2006 - Mai 2011


  • Was bringt dir das ?
    Auf die Kennzeichen achtet sowieso niemand...
    Erstelle lieber einen 3DText den du an das Fahrzeug dran hängst.


    Wenn du nicht weisst wie es geht dann schreibe hier mal rein wie du es definiert hast damit es für das LSPD nur ist!


    z.B.:
    PolizeiFahrzeug[5] = AddStaticVehicle(.........);


    Und schreibe mir hier noch rein wie viele Fahrzeuge du definiert hast.


    MfG,
    Stefan aka PawnScripter

  • Ja das mit 3d ist besser hier mal meine LSPD Fahrzeuge....

    new CCars[25];

    //
    CCars[0]=AddStaticVehicleEx(596,1602.3473,-1631.3943,13.2254,95.5385,1,53,900); // spawnpunkt
    CCars[1]=AddStaticVehicleEx(596,1601.4146,-1627.0009,13.2021,96.6815,1,53,900); // spawnpunkt
    CCars[2]=AddStaticVehicleEx(596,1578.5509,-1710.1372,5.6114,1.9930,1,53,900); // spawnpunkt
    CCars[3]=AddStaticVehicleEx(596,1544.6143,-1645.8926,5.6117,137.2145,1,53,900); // spawnpunkt
    CCars[4]=AddStaticVehicleEx(596,1600.5957,-1696.4229,5.6117,88.9066,1,53,900); // spawnpunkt
    CCars[5]=AddStaticVehicleEx(596,1600.7195,-1688.2073,5.6123,89.5649,1,53,900); // spawnpunkt
    CCars[6]=AddStaticVehicleEx(599,1599.4655,-1691.9812,6.0815,89.1419,1,53,900); // spawnpunk
    CCars[7]=AddStaticVehicleEx(599,1591.1240,-1711.2455,6.0776,0.2440,1,53,900); // spawnpunk
    CCars[8]=AddStaticVehicleEx(599,1529.6580,-1688.3328,6.0806,270.0360,1,53,900); // spawnpunk
    CCars[9]=AddStaticVehicleEx(497,1549.6096,-1707.0879,28.5715,86.0482,1,53,900); // spawnpunkt
    CCars[10]=AddStaticVehicleEx(497,1549.2664,-1643.8948,28.5516,87.0959,1,53,900); // spawnpunkt
    CCars[11]=AddStaticVehicleEx(523,1557.6248,-1712.6948,5.4610,2.6269,1,53,900); // LSPDBike1
    CCars[12]=AddStaticVehicleEx(523,1560.1682,-1712.6449,5.4622,0.0872,1,53,900); // LSPDBike2
    CCars[13]=AddStaticVehicleEx(523,1562.2604,-1712.4757,5.4610,359.9478,1,53,900); // LSPDBike3
    CCars[14]=AddStaticVehicleEx(523,1564.5179,-1712.2625,5.4596,1.4984,1,53,900); // LSPDBike4
    CCars[15]=AddStaticVehicleEx(523,1566.9431,-1712.2151,5.4603,0.0046,1,53,900); // LSPDBike5
    CCars[16]=AddStaticVehicleEx(523,1569.7109,-1712.0548,5.4590,355.9141,1,53,900); // LSPDBike6
    CCars[17]=AddStaticVehicleEx(523,1571.8588,-1711.9513,5.4565,2.6190,1,53,900); // LSPDBike7
    CCars[18]=AddStaticVehicleEx(601,1545.3829,-1667.8069,5.6494,89.7274,1,53,900); // LSPDWasserwerfer1
    CCars[19]=AddStaticVehicleEx(601,1545.4329,-1671.8944,5.6494,88.3259,1,53,900); // LSPDWasserwerfer2
    CCars[20]=AddStaticVehicleEx(596,1535.9686,-1666.9926,13.1037,359.3910,1,53,900); // LSPDCAR1
    CCars[21]=AddStaticVehicleEx(596,1535.9348,-1678.2594,13.1038,359.6461,1,53,900); // LSPDCAR2
    CCars[22]=AddStaticVehicleEx(596,1601.1077,-1622.6941,13.1976,97.5928,1,53,900); // LSPDCAR3
    CCars[23]=AddStaticVehicleEx(596,1601.5436,-1700.2389,5.6126,90.2587,1,53,900); // LSPDCAR4
    CCars[24]=AddStaticVehicleEx(596,1601.3307,-1683.6648,5.6119,90.0309,1,53,900); // LSPDCAR5
    //


    Wie mache ich das jetzt mit dem 3D Nummernschild ?


    SA-MP Zeit: Since Juni - 2006 - Mai 2011


  • So...


    Dann schreibste das mal bei OnGameModeInit rein, am besten direkt unter die Fahrzeuge:



    new Text3D:CCCars1 = Create3DTextLabel("[GTA:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars1, CCarsVehs[0], 0.0, 0.0, 0.0);


    Und das machst du dann immer so weiter bis du an dem letzten Fahrzeug angekommen bist.


    Und vergiss nicht immer wieder CCCars1 zu der nächsten Zahl zu ändern sprich jetzt CCCars2.


    MfG,
    Stefan aka PawnScripter

  • Ok danke und wie meinst du das genau mit den sachen ?

    new Text3D:CCCars1 = Create3DTextLabel("[GTA:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars1, CCarsVehs[0], 0.0, 0.0, 0.0);



    Kannst du das fahrzeug mir mal vor machen ?
    CCars[0]=AddStaticVehicleEx(596,1602.3473,-1631.3943,13.2254,95.5385,1,53,900);


    SA-MP Zeit: Since Juni - 2006 - Mai 2011


  • Das hier ist doch schon das Fahrzeug 0.
    Du musst das jetzt so machen:



    new Text3D:CCCars2 = Create3DTextLabel("[GTA:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars2, CCarsVehs[1], 0.0, 0.0, 0.0);


    Siehe bei
    Attach3DTextLabelToVehicle
    wurde CCCars 1 zu 2 gemacht und CCarsVehs[0] zu 1 gemacht.
    Und du musst oben bei
    new Text3D:CCCars1.....
    musst du das so machen:
    new Text3D:CCCars2.....
    Sonst wird genau das gleiche Kennzeichen 2 mal auf 1 Fahrzeug gesetzt.


    MfG,
    Stefan aka PawnScripter

  • Mal kleine frage neben bei will dafür nich extra Thema eröffnen^^


    wie mache ich n Nummernschild für alle Autos?


    Aso ich Möchte des nummer Schild "LXR 123" haben an allen fahrzeugen ist das Möglich?

  • Was das so lassen oder wie ?
    ,0xFF0000FF,30.0,30.0,5.0,30.0,0);



    Und das ?
    CCarsVehs[1], 0.0, 0.0, 0.0);

    ,0xFF0000FF,30.0,30.0,5.0,30.0,0);



    Das kannst du die ganze zeit über so lassen das sind die Coords usw...


    Aber wenn du eine andere Farbe haben willst dann kannst du:
    0xFF0000FF
    zu
    COLOR_ROT
    oder anderen Farben ändern.


    CCarsVehs[1], 0.0, 0.0, 0.0);

    Da musst du immer hinten die 1 zu 2 machen, dann wieder alles kopieren neu einfügen dann haste den nächsten 3ten Text und dort machst du dann anstatt 2 eine 3 und immer so weiter bis du bei der Maximal Zahl deiner Fahrzeuge angekommen bist.


    MfG,
    Stefan aka PawnScripter

  • Wenn du weitere Hilfe brauchst wende dich an mich per PN.


    MfG,
    Stefan aka PawnScripter

  • Zitat

    Wenn du weitere Hilfe brauchst wende dich an mich per PN.


    MfG,
    Stefan aka PawnScripter


    Kannst ja meine frage Beantworten :P

  • GabbaFreak:
    Wenn du wirklich jedes einzelne Fahrzeug einem 3DText zuweissen möchtest tust du das entweder indem du einen 3DText in einen Timer schreibst oder du schreibst jedes einzelne Auto so rein was viel Platz und Ressourcen verbraucht.

  • Hier mal meine warnings ?
    (20510) : warning 219: local variable "CCCars0" shadows a variable at a preceding level
    (20513) : warning 219: local variable "CCCars1" shadows a variable at a preceding level
    (20516) : warning 219: local variable "CCCars2" shadows a variable at a preceding level
    (20519) : warning 219: local variable "CCCars3" shadows a variable at a preceding level
    (20522) : warning 219: local variable "CCCars4" shadows a variable at a preceding level
    (20525) : warning 219: local variable "CCCars5" shadows a variable at a preceding level
    (20528) : warning 219: local variable "CCCars6" shadows a variable at a preceding level
    (20531) : warning 219: local variable "CCCars7" shadows a variable at a preceding level
    (20534) : warning 219: local variable "CCCars8" shadows a variable at a preceding level
    (20537) : warning 219: local variable "CCCars9" shadows a variable at a preceding level
    (20540) : warning 219: local variable "CCCars10" shadows a variable at a preceding level
    (20543) : warning 219: local variable "CCCars11" shadows a variable at a preceding level
    (20546) : warning 219: local variable "CCCars12" shadows a variable at a preceding level
    (73396) : warning 203: symbol is never used: "CCCars0"
    (73396) : warning 203: symbol is never used: "CCCars1"
    (73396) : warning 203: symbol is never used: "CCCars10"
    (73396) : warning 203: symbol is never used: "CCCars11"
    (73396) : warning 203: symbol is never used: "CCCars12"
    (73396) : warning 203: symbol is never used: "CCCars2"
    (73396) : warning 203: symbol is never used: "CCCars3"
    (73396) : warning 203: symbol is never used: "CCCars4"
    (73396) : warning 203: symbol is never used: "CCCars5"
    (73396) : warning 203: symbol is never used: "CCCars6"
    (73396) : warning 203: symbol is never used: "CCCars7"
    (73396) : warning 203: symbol is never used: "CCCars8"
    (73396) : warning 203: symbol is never used: "CCCars9"


    Hier mal mein code...
    //====================================
    new CCCars0;
    new CCCars1;
    new CCCars2;
    new CCCars3;
    new CCCars4;
    new CCCars5;
    new CCCars6;
    new CCCars7;
    new CCCars8;
    new CCCars9;
    new CCCars10;
    new CCCars11;
    new CCCars12;
    //====================================


    new CCars[25];


    public OnGameModeInit()
    {
    //======================= [ 3D Nummernschild System ] ========================
    new Text3D:CCCars0 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars0, CCars[0], 0.0, 0.0, 0.0);


    new Text3D:CCCars1 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars1, CCars[1], 0.0, 0.0, 0.0);


    new Text3D:CCCars2 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars2, CCars[2], 0.0, 0.0, 0.0);


    new Text3D:CCCars3 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars3, CCars[3], 0.0, 0.0, 0.0);


    new Text3D:CCCars4 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars4, CCars[4], 0.0, 0.0, 0.0);


    new Text3D:CCCars5 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars5, CCars[5], 0.0, 0.0, 0.0);


    new Text3D:CCCars6 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars6, CCars[6], 0.0, 0.0, 0.0);


    new Text3D:CCCars7 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars7, CCars[7], 0.0, 0.0, 0.0);


    new Text3D:CCCars8 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars8, CCars[8], 0.0, 0.0, 0.0);


    new Text3D:CCCars9 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars9, CCars[9], 0.0, 0.0, 0.0);


    new Text3D:CCCars10 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars10, CCars[10], 0.0, 0.0, 0.0);


    new Text3D:CCCars11 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars11, CCars[11], 0.0, 0.0, 0.0);


    new Text3D:CCCars12 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars12, CCars[12], 0.0, 0.0, 0.0);




    CCars[0]=AddStaticVehicleEx(596,1602.3473,-1631.3943,13.2254,95.5385,1,53,900); // spawnpunkt
    CCars[1]=AddStaticVehicleEx(596,1601.4146,-1627.0009,13.2021,96.6815,1,53,900); // spawnpunkt
    CCars[2]=AddStaticVehicleEx(596,1578.5509,-1710.1372,5.6114,1.9930,1,53,900); // spawnpunkt
    CCars[3]=AddStaticVehicleEx(596,1544.6143,-1645.8926,5.6117,137.2145,1,53,900); // spawnpunkt
    CCars[4]=AddStaticVehicleEx(596,1600.5957,-1696.4229,5.6117,88.9066,1,53,900); // spawnpunkt
    CCars[5]=AddStaticVehicleEx(596,1600.7195,-1688.2073,5.6123,89.5649,1,53,900); // spawnpunkt
    CCars[6]=AddStaticVehicleEx(599,1599.4655,-1691.9812,6.0815,89.1419,1,53,900); // spawnpunk
    CCars[7]=AddStaticVehicleEx(599,1591.1240,-1711.2455,6.0776,0.2440,1,53,900); // spawnpunk
    CCars[8]=AddStaticVehicleEx(599,1529.6580,-1688.3328,6.0806,270.0360,1,53,900); // spawnpunk
    CCars[9]=AddStaticVehicleEx(497,1549.6096,-1707.0879,28.5715,86.0482,1,53,900); // spawnpunkt
    CCars[10]=AddStaticVehicleEx(497,1549.2664,-1643.8948,28.5516,87.0959,1,53,900); // spawnpunkt
    CCars[11]=AddStaticVehicleEx(523,1557.6248,-1712.6948,5.4610,2.6269,1,53,900); // LSPDBike1
    CCars[12]=AddStaticVehicleEx(523,1560.1682,-1712.6449,5.4622,0.0872,1,53,900); // LSPDBike2


    Was mache ich den falsch das Warnings kommen ?


    Edit // Text eingefügt


    SA-MP Zeit: Since Juni - 2006 - Mai 2011


    Einmal editiert, zuletzt von HighDef ()

  • //====================================
    new CCCars0;
    new CCCars1;
    new CCCars2;
    new CCCars3;
    new CCCars4;
    new CCCars5;
    new CCCars6;
    new CCCars7;
    new CCCars8;
    new CCCars9;
    new CCCars10;
    new CCCars11;
    new CCCars12;
    //====================================


    Musst du löschen da dir das nix bringt da es bei OnGameModeInit schon drinne definiert ist.
    Siehe:


    new Text3D:CCCars0 = Create3DTextLabel("[BL:LSPD]",0xFF0000FF,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToVehicle(CCCars0, CCars[0], 0.0, 0.0, 0.0);


    Also:
    new Text3D:CCCars0
    Dort ist die Definition schon drinne...