Old bug - Not fixed
#3

pawn Code:
stock SetVehicleToRespawnEx(vehicleid)
{
    if(vehicleid == INVALID_VEHICLE_ID) return SetVehicleToRespawn(vehicleid);
    if(GetVehicleModel(vehicleid) == 537 || GetVehicleModel(vehicleid) == 538 || GetVehicleModel(vehicleid) == 449)
    {
        for (new i = 0; i != MAX_PLAYERS; ++i)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID && GetPlayerSurfingVehicleID(playerid) == vehicleid)
                {
                    GetPlayerPos(playerid, x, y, z);
                    SetPlayerPos(playerid, x+2.5, x, y, z+0.5);
                   
                    continue;
                }
            }
        }
       
        return SetVehicleToRespawn(vehicleid);
    }
}

#if defined _ALS_SetVehicleToRespawn
  #undef SetVehicleToRespawn
#else
#define _ALS_SetVehicleToRespawn
#endif

#define SetVehicleToRespawn SetVehicleToRespawnEx

stock DestroyVehicleEx(vehicleid)
{
    if(vehicleid == INVALID_VEHICLE_ID) return DestroyVehicle(vehicleid);
    if(GetVehicleModel(vehicleid) == 537 || ( GetVehicleModel (vehicleid )) == 538 || GetVehicleModel(vehicleid) == 449)
    {
        for (new i = 0; i != MAX_PLAYERS; ++i)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID && GetPlayerSurfingVehicleID(playerid) == vehicleid)
                {
                    GetPlayerPos(playerid, x, y, z);
                    SetPlayerPos(playerid, x+2.5, x, y, z+0.5);

                    continue;
                }
            }
        }

        return DestroyVehicle(vehicleid);
    }
}

#if defined _ALS_DestroyVehicle
  #undef DestroyVehicle
#else
#define _ALS_DestroyVehicle
#endif

#define DestroyVehicle DestroyVehicleEx
Basically set's their position off a bit and completes the operation, this isn't tested but is a possible fix.
Reply


Messages In This Thread
Old bug - Not fixed - by Kyle - 08.01.2013, 15:15
Re: Old bug - Not fixed - by Kyle - 09.03.2015, 18:55
Re: Old bug - Not fixed - by Abagail - 09.03.2015, 19:17
Re: Old bug - Not fixed - by Kyle - 10.03.2015, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)