[Hilfe] Fahrschul Cars

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
  • Mein Problem ist das die Fahrschulcars auf der Straße stehen wenn
    eun Fahrlehrer aus dem Gebäude rausgeht.
    Alle Fahrlehrer Spawnen in der Hütte aber wenn sie rausgehen sind alle autos, LKWs etc. auf der Straße wieso?


    //Fahrschule
    new fsCars[21];


    new fsenter;
    new fsexit;
    new fsenter1;
    new fsenter2;


    //Fahrschule
    forward IsAFS(playerid);
    forward IsAFSCar(carid);


    //Fahrschule
    public IsAFS(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    if(member==11)
    {
    return 1;
    }
    else if(leader==11)
    {
    return 1;
    }
    else if(TakingLesson[playerid] == 1)
    {
    return 1;
    }
    }
    return 0;
    }
    public IsAFSCar(carid)
    {
    for(new i = 0; i < sizeof(fsCars); i++)
    {
    if(carid == fsCars[i])
    {
    return 1;
    }
    }
    return 0;
    }


    if(pickupid == fsenter)
    {
    SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875);
    SetPlayerVirtualWorld(playerid, 2);
    SetPlayerInterior(playerid, 3);
    }
    if(pickupid == fsexit)
    {
    SetPlayerPos(playerid,-2027.6202,-98.5120,35.1641);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    }
    if(pickupid == fsenter1)
    {
    SetPlayerPos(playerid,-2029.8390,-124.0219,35.2103);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    }
    if(pickupid == fsenter2)
    {
    SetPlayerPos(playerid,-2029.1348,-117.1901,1035.1719);
    SetPlayerVirtualWorld(playerid, 2);
    SetPlayerInterior(playerid, 3);
    }


    fsenter = CreatePickup(1318,1,-2026.7104,-102.0641,35.1641,-1); //Fsenter
    fsexit = CreatePickup(1318,1,-2026.9424,-103.6040,1035.1826,-1); //Fsexit
    fsenter1 = CreatePickup(1318,1,-2029.8849,-119.6186,1035.1719,-1); //fsenter1
    fsenter2 = CreatePickup(1318,1,-2029.7388,-120.8581,35.2103,-1); //fsenter2


    //-------------------------------------[FS Cars]-----------------------------------------------------------
    fsCars[0] = CreateVehicle(487,-2027.7196,-111.2363,39.0985,5.0025,1,1,600); //
    fsCars[1] = CreateVehicle(560,-2064.3904,-83.9506,34.8699,0.7831,1,1,600); //
    fsCars[2] = CreateVehicle(560,-2068.4004,-83.9618,34.8742,0.8567,1,1,600); //
    fsCars[3] = CreateVehicle(560,-2072.7258,-84.0083,34.8691,0.0568,1,1,600); //
    fsCars[4] = CreateVehicle(560,-2077.0510,-84.0153,34.8695,359.7835,1,1,600); //
    fsCars[5] = CreateVehicle(405,-2080.9822,-84.2342,35.0391,0.9982,1,1,600); //
    fsCars[6] = CreateVehicle(405,-2085.3892,-83.9527,35.0393,1.2645,1,1,600); //
    fsCars[7] = CreateVehicle(405,-2089.4353,-84.2617,35.0391,0.6078,1,1,600); //
    fsCars[8] = CreateVehicle(405,-2093.7131,-84.1595,35.0956,359.5796,1,1,600); //
    fsCars[9] = CreateVehicle(521,-2093.7769,-101.0666,34.7345,270.1075,1,1,600); //
    fsCars[10] = CreateVehicle(461,-2093.3687,-98.8547,34.7485,266.8549,1,1,600); //
    fsCars[11] = CreateVehicle(581,-2092.6753,-97.2982,34.7605,271.2275,1,1,600); //
    fsCars[12] = CreateVehicle(514,-2023.0475,-94.5940,35.7504,90.0886,1,1,600); //
    fsCars[13] = CreateVehicle(452,-1757.3842,-195.8041,-0.5298,181.7123,1,1,600); //
    fsCars[14] = CreateVehicle(452,-1762.1937,-195.9790,-0.2899,181.6277,1,1,600); //
    fsCars[16] = CreateVehicle(593,325.1767,2537.9663,17.2671,179.3862,1,1,600); //
    fsCars[17] = CreateVehicle(593,290.6677,2540.4951,17.2812,180.2924,1,1,600); //
    fsCars[18] = CreateVehicle(514,-2023.0011,-89.6413,35.9079,90.2796,1,1,600); //
    fsCars[19] = CreateVehicle(450,-1732.7373,-92.8904,4.1964,146.6553,1,1,600); //
    fsCars[20] = CreateVehicle(450,-1749.1136,-88.9948,4.1765,195.4723,1,1,600); //


    if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)// Fahrschule
    {
    SetPlayerPos(playerid, -2017.8889,-105.2508,35.0212);
    SetPlayerFacingAngle(playerid, 183.1620);
    SetPlayerVirtualWorld(playerid, 2);
    SetPlayerInterior(playerid, 3);
    PlayerInfo[playerid][pInt] = 0;
    return 1;
    }



    Danke im Vorraus





  • fsCars[0] = AddStaticVehicle(487,-2027.7196,-111.2363,39.0985,5.0025,1,1,600); //
    fsCars[1] = AddStaticVehicle(560,-2064.3904,-83.9506,34.8699,0.7831,1,1,600); //
    fsCars[2] = AddStaticVehicle(560,-2068.4004,-83.9618,34.8742,0.8567,1,1,600); //
    fsCars[3] = AddStaticVehicle(560,-2072.7258,-84.0083,34.8691,0.0568,1,1,600); //
    fsCars[4] = AddStaticVehicle(560,-2077.0510,-84.0153,34.8695,359.7835,1,1,600); //
    fsCars[5] = AddStaticVehicle(405,-2080.9822,-84.2342,35.0391,0.9982,1,1,600); //
    fsCars[6] = AddStaticVehicle(405,-2085.3892,-83.9527,35.0393,1.2645,1,1,600); //
    fsCars[7] = AddStaticVehicle(405,-2089.4353,-84.2617,35.0391,0.6078,1,1,600); //
    fsCars[8] = AddStaticVehicle(405,-2093.7131,-84.1595,35.0956,359.5796,1,1,600); //
    fsCars[9] = AddStaticVehicle(521,-2093.7769,-101.0666,34.7345,270.1075,1,1,600); //
    fsCars[10] = AddStaticVehicle(461,-2093.3687,-98.8547,34.7485,266.8549,1,1,600); //
    fsCars[11] = AddStaticVehicle(581,-2092.6753,-97.2982,34.7605,271.2275,1,1,600); //
    fsCars[12] = AddStaticVehicle(514,-2023.0475,-94.5940,35.7504,90.0886,1,1,600); //
    fsCars[13] = AddStaticVehicle(452,-1757.3842,-195.8041,-0.5298,181.7123,1,1,600); //
    fsCars[14] = AddStaticVehicle(452,-1762.1937,-195.9790,-0.2899,181.6277,1,1,600); //
    fsCars[16] = AddStaticVehicle(593,325.1767,2537.9663,17.2671,179.3862,1,1,600); //
    fsCars[17] = AddStaticVehicle(593,290.6677,2540.4951,17.2812,180.2924,1,1,600); //
    fsCars[18] = AddStaticVehicle(514,-2023.0011,-89.6413,35.9079,90.2796,1,1,600); //
    fsCars[19] = AddStaticVehicle(450,-1732.7373,-92.8904,4.1964,146.6553,1,1,600); //
    fsCars[20] = AddStaticVehicle(450,-1749.1136,-88.9948,4.1765,195.4723,1,1,600); //


    Hab ich aber alles Warnings

  • CreateVehicleForServer <- Damit bekommste keine Warnings ;)


    War bei mir genaus



    - LolRiTTeR

    [align=center]

  • wie definiere ich dieses CreateVehicleForServer ?

    CreateVehicleForServer(455,1772.201,-2071.021,14.164,0.0,47,47,0,14,4,0);



    Normalerweise so.. Da ist aber dann direkt Farbe etc. mit drin ^^


    (AUTOID, COORDX, COORDY, COORDZ, 0.0, FARBE1, FARBE2, 0, FRAKTIONSID, 4, 0);


    Mehr wüsste ich nicht^^



    Geht aber auch so:
    CreateVehicleForServer(455,1772.201,-2071.021,14.164,0.0);




    - LolRiTTeR

    [align=center]

  • achso ne ich bekomme error weil ich das noch ni cht definiert habe.. wie mache ich dies ?


    (9384) : error 017: undefined symbol "CreateVehicleForServer"


    das ist die zeile
    fsCars[0] = CreateVehicleForServer(487,-2027.7196,-111.2363,39.0985,5.0025,1,1,600); //

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Erstmal brauchst du da garnichts definieren...


    Du gibst uns durch welche Zeile für den obenstehenden Fehler verantwortlich ist,
    wir geben dir die Antwort,
    Ende.


    Der Glaskugelverkauf wurde von Steve Jobs leider gestoppt, um seine bösen Machenschaften zu vertuschen.


    Achja, und.. tu uns allen einen Gefallen und benutze in Zukunft bitte die Wiki als ersten Anlaufpunkt, was solche Fehler angeht.

  • forward CreateVehicleForServer(modelid, Float:X, Float:Y, Float:Z, Float:R, color1, color2);
    Das oben als forward eintragen^^


    Dann damit Autos erstellen:
    CreateVehicleForServer(455,1772.201,-2071.021,14.164,0.0,47,47);


    CreateVehicleForServer(ModelID, COORDX, COORDY, COORDZ, COORDR, FARBE1, FARBE2);


    - LolRiTTeR

    [align=center]

  • Deine Vorschläge : Die interessieren mich überhaupt nicht .
    Achso .. wtf sollte eig. nicht für mein Name sein sondern für dein dummes geschwätz.
    Aber naja ich möchte mein Niveau nicht so runter setzten wie deines.!
    MfG

  • fsCars[0] = AddStaticVehicle(487,-2027.7196,-111.2363,39.0985,5.0025,1,1); //


    die 600 kommt bei addstaticvehicle nicht ;D


    (die 600 ist die respawnzeit die es bei dem normalen addstaticvehicle nicht gibs)