Quote:
Originally Posted by Abagail
pawn Code:
stock SetVehicleToRespawnEx(vehicleid) { if(vehicleid == INVALID_VEHICLE_ID) return SetVehicleToRespawn(vehicleid); if(vehicleid == 537 || vehicleid == 538 || 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(vehicleid == 537 || vehicleid == 538 || 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.
|
What about when OnVehicleDeath is called because the car died or went into water.