Habe ein kleines Problem mit Autos ^^

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

  • new cop;


    cop = AddStaticVehicleEx(596,1562.1816,-1606.1605,13.1037,179.8929,0,1,600); // pdcarout
    cop = AddStaticVehicleEx(596,1556.4865,-1606.2377,13.1041,181.0045,0,1,600); // pdcarout
    cop = AddStaticVehicleEx(599,1587.3245,-1711.0078,6.0792,358.8727,0,1,600); // pd ranger
    cop = AddStaticVehicleEx(599,1583.5404,-1711.0835,6.0800,0.4832,0,1,600); // pdranger
    cop = AddStaticVehicleEx(599,1578.7986,-1711.1576,6.0804,359.2427,0,1,600); // pdranger
    cop = AddStaticVehicleEx(599,1558.6119,-1711.4396,6.0799,0.5020,0,1,600); // pdranger
    cop = AddStaticVehicleEx(411,1585.9371,-1671.4740,5.6210,271.4472,7,7,600); // pd infernus
    cop = AddStaticVehicleEx(411,1585.8853,-1667.9272,5.6234,268.9742,7,7,600); // pd infernus
    cop = AddStaticVehicleEx(447,1566.1478,-1658.9561,28.4058,88.7365,0,0,600); // pd hubi 1
    cop = AddStaticVehicleEx(497,1566.5088,-1693.8384,28.5699,93.4266,0,1,600); // pd hubi 2
    cop = AddStaticVehicleEx(523,1545.6335,-1663.0016,5.4610,85.4289,0,0,600); // pdbike
    cop = AddStaticVehicleEx(523,1545.8560,-1667.6674,5.4564,78.5204,0,0,600); // pdbike
    cop = AddStaticVehicleEx(523,1546.2268,-1671.8860,5.4575,83.8290,0,0,600); // pdbike
    cop = AddStaticVehicleEx(523,1545.7295,-1676.5099,5.4576,71.7062,0,0,600); // pdbike
    cop = AddStaticVehicleEx(596,1601.6404,-1704.3311,5.6120,90.2117,0,1,600); // pdcar
    cop = AddStaticVehicleEx(596,1601.6581,-1699.9390,5.6124,89.1463,0,1,600); // pdcar
    cop = AddStaticVehicleEx(596,1601.5392,-1696.3334,5.6116,91.2491,0,1,600); // pdcar
    cop = AddStaticVehicleEx(596,1601.8751,-1684.3292,5.6119,90.1932,0,1,600); // pdcar
    cop = AddStaticVehicleEx(596,1601.9603,-1687.9211,5.6114,88.5647,0,1,600); // pdcar

    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    if(vehicleid == cop)
    {
    if (PlayerInfo[playerid][pMember] >= 1)
    {
    }
    else
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_ROT,"Dieses Car ist nur für Cops");
    }
    }


    return 1;
    }

    warum können die anderen Fraktionen trodzdem in die autos rein ?

  • public IsACopCar(carid)
    {
    if(carid >= cop && carid <=cop || carid == cop)
    {


    return 1;
    }
    return 0;
    }


    das muss auch noch rein^^

  • das fehlt auch xD
    if(IsACopCar(newcar))
    {
    if(IsACop(playerid)) { }
    SendClientMessage(playerid, COLOR_RED, "Du bist kein Cop");
    else { RemovePlayerFromVehicle(playerid); }
    }