policeVehicles =
{
[ 598 ] = true,
[ 596 ] = true,
[ 597 ] = true,
[ 599 ] = true
}
copTeams =
{
[ "Police" ] = true,
[ "Military" ] = true,
[ "SWAT" ] = true
}
function enterVehicle ( player, seat, jacked )
if ( policeVehicles [ getElementModel ( source ) ] ) and not ( copTeams [ getTeamName ( getPlayerTeam ( player ) ) ] ) then
cancelEvent ( )
outputChatBox ( "Only policeman can enter police cars!", player )
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )