Kann mich nicht aus dem Fenster lehnen

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
  • Du hast ein AntriDrivby wohl in dem Script eingebaut. Deswegen geht es nicht.

  • Sollte unter OnPlayerStateChange


    zu finden sien.

  • Un wo steht die hier genau?



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(USE_ANTI_VEHICLE_HACK == true)
    {
    if(IsPlayerInAnyVehicle(playerid) || newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
    pVehicles[playerid]++;
    SetTimerEx("VehicleEnterReset", 3000, 0, "i", playerid);
    if(pVehicles[playerid] >= MAX_ENTER_VEHICLES)
    {
    SendClientMessage(playerid, COLOR_RED, "{539600}[ANTI-CHEAT]{74D400} You have been kicked for possible vehicle hacks.");
    FixedKick(playerid);
    }
    }
    }
    // Vehicle Heatlh Bar
    if(newstate == PLAYER_STATE_DRIVER)
    {
    CarLabel[playerid] = CreatePlayer3DTextLabel(playerid," ",-1,0,0,0.9,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
    UpdateBar(playerid);
    }
    else
    {
    DeletePlayer3DTextLabel(playerid,CarLabel[playerid]);
    }
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
    new veh = GetPlayerVehicleID(playerid);
    if(IsAVel(veh)) return 0;
    new seat = GetPlayerVehicleSeat(playerid);
    if(seat != 0)
    {
    PassengerInCar[veh][seat] = playerid;
    PassengerSeat[playerid] = seat;
    OldCar[playerid] = veh;
    }
    PlayVehicleRadioForPlayer(playerid,VehRadio[veh]);
    }
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
    new veh = GetPlayerVehicleID(playerid);
    if(IsAVel(veh)) return 0;
    StopAudioStreamForPlayer(playerid);
    if(OldCar[playerid] != INVALID_VEHICLE_ID)
    {
    PassengerInCar[OldCar[playerid]][PassengerSeat[playerid]] = INVALID_PLAYER_ID;
    OldCar[playerid] = INVALID_VEHICLE_ID;
    }
    }
    /* if(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT && GetPlayerSurfingVehicleID(playerid)==INVALID_VEHICLE_ID)
    {
    new Float:x, Float:y, Float:z;
    SetPlayerPos(playerid,x+2,y+2,z);
    }*/
    if(newstate == PLAYER_STATE_ONFOOT)
    {
    fMeter[playerid] = 0;
    Speedo[playerid] = 0;
    TextDrawHideForPlayer(playerid, speedometer);
    TextDrawHideForPlayer(playerid, fuelmeter);
    }
    if((newstate == PLAYER_STATE_DRIVER) || (newstate == PLAYER_STATE_PASSENGER))
    {
    for(new j=0; j<11; j++) GetPlayerWeaponData(playerid, j, Weapons[playerid][j], Ammo[playerid][j]);
    ResetPlayerWeapons(playerid);
    }
    if((newstate == PLAYER_STATE_ONFOOT) && ((oldstate == PLAYER_STATE_DRIVER) || (oldstate == PLAYER_STATE_PASSENGER)))
    {
    for(new j=0; j<11; j++) GiveZaiatWeapon(playerid, Weapons[playerid][j], Ammo[playerid][j]);
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
    SetPlayerArmedWeapon(playerid,0);
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
    SendClientMessage(playerid, COLOR_GREY, "Warning: Don't forgot too check your fuel (/tog fuel) and seatbelt (/sb).");
    SendClientMessage(playerid, COLOR_GREY, "Always tired of the normal radio stations? Press CTRL for 1/2 seconds :).");
    SendClientMessage(playerid, COLOR_GREY, "You dont want the music? /music stop");
    }
    if(newstate == PLAYER_STATE_PASSENGER)
    {
    SetPlayerArmedWeapon(playerid,0);
    }
    if(newstate == PLAYER_STATE_PASSENGER)
    {
    if(newstate == PLAYER_STATE_PASSENGER)
    {
    new gun,tmp;
    GetPlayerWeaponData(playerid,4,gun,tmp);
    #pragma unused tmp
    if(gun)SetPlayerArmedWeapon(playerid,gun);
    else SetPlayerArmedWeapon(playerid,0);
    }
    if(GetPlayerVehicleID(playerid) == NPCBus)
    {
    new string[128], BusDriver = RPIDFN("BusDriver");
    if(PlayerInfo[playerid][pMoney] < 2)
    {
    RemovePlayerFromVehicle(playerid);
    format(string, sizeof(string), "Bus Driver shouts: Get out of the bus poor hobo!");
    SendNearbyMessage(BusDriver, 30, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    return 1;
    }
    format(string, sizeof(string), "Bus Driver says: The ticket costs $5, you will have to pay $2 everytime the bus stops.");
    SendNearbyMessage(BusDriver, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
    format(string, sizeof(string), "* %s takes out $5, hands them to the bus driver and grabs a ticket.", RPN(playerid));
    if(PlayerInfo[playerid][pMaskOn] == 1)
    {
    format(string, sizeof(string), "* Stranger takes out $5, hands them to the bus driver and grabs a ticket.");
    }
    else
    {
    format(string, sizeof(string), "* %s takes out $5, hands them to the bus driver and grabs a ticket.", RPN(playerid));
    }
    SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
    GiveZaiatMoney(playerid, -5);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, " You will not recieve any playing minutes until you get out of the bus.");
    SetTimerEx("BusTimer", 1000, false, "i", playerid);
    }
    }
    if(newstate == PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_DRIVER)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(!engine) SendClientMessage(playerid, COLOR_WHITE, "You can start or stop the vehicle's engine using {FF6347}/engine{FFFFFF} or press 2.");
    if(!PlayerInfo[playerid][pCarLic]) SendClientMessage(playerid, COLOR_LIGHTRED, " You don't have a drivers license, beware of cops.");
    if(IsATowTruck(vehicleid)) SendClientMessage(playerid, COLOR_WHITE, "You can tow a vehicle using {FF6347}/(un)tow{FFFFFF}.");
    }
    return 1;
    }

  • Schaue ab dieser Zeile.


    if(newstate == PLAYER_STATE_PASSENGER)
    {
    SetPlayerArmedWeapon(playerid,0);

  • Ich hab da jetzt vieles Ausprobiert, aber bis jetzt ist immer noch das selbe Problem, was muss ich denn genau ändern/löschen, deiner meinung nach?


    //edit: Habe gefunden Danke sehr :)

    Einmal editiert, zuletzt von mac12g ()