diff --git a/gamemodes/irresistible/cnr/features/minijobs/meth.pwn b/gamemodes/irresistible/cnr/features/minijobs/meth.pwn index 0a13c23..c6858f6 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/meth.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/meth.pwn @@ -517,4 +517,31 @@ stock GetPlayerCausticSoda( playerid ) return p_CausticSoda{ playerid }; stock SetPlayerCausticSoda( playerid, amount ) { p_CausticSoda{ playerid } = amount; +} + +stock RemovePlayersFromJourney( vehicleID ) +{ + new Float: x, Float: y, Float: z; + + foreach ( new playerid : Player ) + { + if ( GetPlayerVirtualWorld( playerid ) == ( vehicleID + VW_METH ) && !p_Spectating{ playerid } ) + { + haltMethamphetamine( playerid, vehicleID ); + + GetVehiclePos( vehicleID, x, y, z ); + SetPlayerPos( playerid, x, y, z ); + SetPlayerInterior( playerid, 0 ); + SetPlayerVirtualWorld( playerid, 0 ); + + p_MuriaticAcid{ playerid } = 0; + p_CausticSoda{ playerid } = 0; + p_Methamphetamine{ playerid } = 0; + p_HydrogenChloride{ playerid } = 0; + + SendServerMessage( playerid, "You have been removed from a player-owned Journey as the player who owned it has left the server." ); + } + } + + return 1; } \ No newline at end of file diff --git a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn index 0a053c2..c44197b 100644 --- a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn +++ b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn @@ -846,7 +846,11 @@ stock dischargeVehicles( playerid ) if ( p_OwnedVehicles[ playerid ] ) { for( new v; v < MAX_BUYABLE_VEHICLES; v++ ) - DestroyBuyableVehicle( playerid, v, .db_remove = false ); + { + if ( g_vehicleData[ playerid ][ v ][ E_MODEL ] == 508 ) RemovePlayersFromJourney( g_vehicleData[ playerid ][ v ][ E_VEHICLE_ID ] ); + DestroyBuyableVehicle( playerid, v, .db_remove = false ); + } + } return 1; }