removes the ability for passive players to enter business vehicles

This commit is contained in:
Damen 2019-01-25 01:33:31 -05:00
parent 3a5a562b8e
commit 0291b7ddec

View File

@ -506,6 +506,13 @@ hook OnPlayerDriveVehicle( playerid, vehicleid )
{ {
if ( g_isBusinessVehicle[ vehicleid ] != -1 && Iter_Contains( business, g_isBusinessVehicle[ vehicleid ] ) ) if ( g_isBusinessVehicle[ vehicleid ] != -1 && Iter_Contains( business, g_isBusinessVehicle[ vehicleid ] ) )
{ {
if ( IsPlayerPassive( playerid ) )
{
ShowPlayerHelpDialog( playerid, 2000, "Passive players cannot enter business vehicles." );
RemovePlayerFromVehicle( playerid );
return 1;
}
new new
businessid = g_isBusinessVehicle[ vehicleid ]; businessid = g_isBusinessVehicle[ vehicleid ];