Habe zwei Probleme

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
  • Hey Leute,


    Ich habe zwei Probleme die mich ziemlich nerven aber ich weis nicht wie ich diese beheben kann da keine Errors kommen


    1.Problem:
    Immer wenn sich einer vom Server ausloggt geht dieser aus.
    Dies sind die OnPlayerDisconnect zeilen:
    public OnPlayerDisconnect(playerid, reason)
    {
    sSpieler[playerid][sLogin] = 0;
    SpielerSpeichern(playerid);
    SendClientMessageToAll(ROT,"SpielerInfo: Ein Spieler hat den Server Verlassen");
    return 1;
    }


    2.Problem
    Ich wollte es so einstellen das eine Bestimmte Fraktion nur ihre eigenen Fahrzeuge fahren kann aber keine von anderen Fahrzeugen
    Dies sind die zeilen für diese Funktion:


    new LVPDCars[40];


    LVPDCars [0]=SetVehicleNumberPlate(CreateVehicle(497,2343.9563,2472.8572,38.8602,0.0336,103,1,3600),"SF-Police"); LVPDCars [20]=SetVehicleNumberPlate(CreateVehicle(497,2328.6121,2472.5056,38.8603,0.0173,103,1,3600),"SF-Police");
    LVPDCars [1]=SetVehicleNumberPlate(CreateVehicle(497,2313.4407,2472.4963,38.9186,0.0055,103,1,3600),"SF-Police"); LVPDCars [21]=SetVehicleNumberPlate(CreateVehicle(523,2278.6038,2433.9097,2.8425,2.4433,103,1,3600),"SF-Police");
    LVPDCars [2]=SetVehicleNumberPlate(CreateVehicle(523,2275.7129,2433.9102,2.8443,0.3042,103,1,3600),"SF-Police"); LVPDCars [22]=SetVehicleNumberPlate(CreateVehicle(523,2277.1260,2428.5710,2.8439,1.3849,103,1,3600),"SF-Police");
    LVPDCars [3]=SetVehicleNumberPlate(CreateVehicle(523,2274.0974,2428.5691,2.8438,0.9954,103,1,3600),"SF-Police"); LVPDCars [23]=SetVehicleNumberPlate(CreateVehicle(523,2271.2603,2428.5276,2.8430,2.5796,103,1,3600),"SF-Police");
    LVPDCars [4]=SetVehicleNumberPlate(CreateVehicle(523,2272.6296,2433.9644,2.8437,2.2361,103,1,3600),"SF-Police"); LVPDCars [24]=SetVehicleNumberPlate(CreateVehicle(528,2277.1135,2431.7068,-7.4102,359.5395,103,1,3600),"SF-Police");
    LVPDCars [5]=SetVehicleNumberPlate(CreateVehicle(528,2272.5471,2432.0171,-7.4085,0.4298,103,1,3600),"SF-Police"); LVPDCars [25]=SetVehicleNumberPlate(CreateVehicle(598,2285.9426,2432.0088,3.0278,359.6366,103,1,3600),"SF-Police");
    LVPDCars [6]=SetVehicleNumberPlate(CreateVehicle(598,2290.3218,2432.1724,3.0255,359.4734,103,1,3600),"SF-Police"); LVPDCars [26]=SetVehicleNumberPlate(CreateVehicle(598,2294.8323,2432.0503,3.0275,359.9279,103,1,3600),"SF-Police");
    LVPDCars [7]=SetVehicleNumberPlate(CreateVehicle(598,2298.9250,2432.0103,3.0263,0.3085,103,1,3600),"SF-Police"); LVPDCars [27]=SetVehicleNumberPlate(CreateVehicle(598,2303.6736,2431.8923,3.0276,0.4894,103,1,3600),"SF-Police");
    LVPDCars [8]=SetVehicleNumberPlate(CreateVehicle(599,2268.2727,2431.5842,3.3689,359.4573,103,1,3600),"SF-Police"); LVPDCars [28]=SetVehicleNumberPlate(CreateVehicle(599,2263.9924,2431.5708,3.3689,0.5193,103,1,3600),"SF-Police");
    LVPDCars [9]=SetVehicleNumberPlate(CreateVehicle(599,2259.7520,2431.3704,3.3688,359.4368,103,1,3600),"SF-Police"); LVPDCars [29]=SetVehicleNumberPlate(CreateVehicle(599,2255.1309,2431.3901,3.3688,1.6720,103,1,3600),"SF-Police");
    LVPDCars [10]=SetVehicleNumberPlate(CreateVehicle(427,2246.6040,2431.3442,-7.3214,0.0805,103,1,3600),"SF-Police"); LVPDCars [30]=SetVehicleNumberPlate(CreateVehicle(427,2250.8728,2431.3784,-7.3213,1.6071,103,1,3600),"SF-Police");
    LVPDCars [11]=SetVehicleNumberPlate(CreateVehicle(432,2229.5828,2453.7004,-7.4424,271.1161,103,1,3600),"SF-Police"); LVPDCars [31]=SetVehicleNumberPlate(CreateVehicle(432,2229.9688,2460.8203,-7.4389,271.3973,103,1,3600),"SF-Police");
    LVPDCars [12]=SetVehicleNumberPlate(CreateVehicle(433,2316.7498,2431.7876,-7.0164,358.9569,103,1,3600),"SF-Police"); LVPDCars [32]=SetVehicleNumberPlate(CreateVehicle(433,2312.1768,2431.9521,-7.0165,359.3383,103,1,3600),"SF-Police");
    LVPDCars [13]=SetVehicleNumberPlate(CreateVehicle(455,2308.0422,2432.0483,-7.0165,358.2854,103,1,3600),"SF-Police"); LVPDCars [33]=SetVehicleNumberPlate(CreateVehicle(470,2313.0425,2455.5593,-7.4574,89.8554,103,1,3600),"SF-Police");
    LVPDCars [14]=SetVehicleNumberPlate(CreateVehicle(470,2313.0493,2460.4827,-7.4590,89.0959,103,1,3600),"SF-Police"); LVPDCars [34]=SetVehicleNumberPlate(CreateVehicle(470,2313.2104,2465.4353,-7.4598,89.0240,103,1,3600),"SF-Police");
    LVPDCars [15]=SetVehicleNumberPlate(CreateVehicle(470,2313.2378,2470.4709,-7.4590,90.2875,103,1,3600),"SF-Police"); LVPDCars [35]=SetVehicleNumberPlate(CreateVehicle(470,2313.2437,2475.5317,-7.4622,89.0964,103,1,3600),"SF-Police");
    LVPDCars [16]=SetVehicleNumberPlate(CreateVehicle(490,2297.9009,2451.5132,-7.3259,269.7858,103,1,3600),"SF-Police"); LVPDCars [36]=SetVehicleNumberPlate(CreateVehicle(490,2297.9155,2456.0994,-7.3246,269.8244,103,1,3600),"SF-Police");
    LVPDCars [17]=SetVehicleNumberPlate(CreateVehicle(501,2238.0969,2439.2905,-8.0035,266.3509,103,1,3600),"SF-Police"); LVPDCars [37]=SetVehicleNumberPlate(CreateVehicle(520,2270.5581,2448.6101,47.7062,359.5634,103,1,3600),"SF-Police");
    LVPDCars [18]=SetVehicleNumberPlate(CreateVehicle(520,2292.0537,2448.6299,47.9097,0.0000,103,1,3600),"SF-Police"); LVPDCars [38]=SetVehicleNumberPlate(CreateVehicle(541,2241.1882,2437.2795,2.6971,267.2801,103,1,3600),"SF-Police");
    LVPDCars [19]=SetVehicleNumberPlate(CreateVehicle(541,2241.3723,2442.3293,2.6971,268.7401,103,1,3600),"SF-Police"); LVPDCars [39]=SetVehicleNumberPlate(CreateVehicle(541,2241.5750,2447.1155,2.6970,270.6637,103,1,3600),"SF-Police");


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate==PLAYER_STATE_DRIVER)
    {
    for(new i=0; i<sizeof(LVPDCars); i++)
    {
    if(GetPlayerVehicleID(playerid) == LVPDCars[i])
    {
    if(IstSpielerInFraktion(playerid,1))
    {
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,ROT,"Du bist kein Mitgleid vom LVPD!");
    }
    }
    }
    }
    return 1;
    }


    Ich hoffe ihr könnt mir bei diesen Problemen helfen
    mfg xxchrisiclpxx