09.03.2015, 19:17
(
Last edited by Abagail; 18/04/2015 at 06:38 PM.
)
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